I have a project which controls & monitors a process via the
parallel port of my PC. This was originally driven by a Qbasic
program, which works OK. I have tried to substitute Powerbasic
code as it is easier to use & much more versatile as regards screen
graphics etc, but I have trouble with the analogue to digital
conversion routine. I suspect it may be to do with the way
Powerbasic treats a code line in the program.This line is:
V=V OR (INP(BASE0 + 1) AND &H10)*(2^(8-CLK))/&H10 .With Qbasic, a zero
input voltage reads zero but with Powerbasic it reads 2.5 volts.
I do not understand the mathematics of this code, so if any reader
has any ideas as to whether this code is the problem or anything else I
would be grateful.
Frank Williams
Taranaki
New Zealand
[email protected]
PS I also use Powerbasic for Windows-It is a great program!
------------------
parallel port of my PC. This was originally driven by a Qbasic
program, which works OK. I have tried to substitute Powerbasic
code as it is easier to use & much more versatile as regards screen
graphics etc, but I have trouble with the analogue to digital
conversion routine. I suspect it may be to do with the way
Powerbasic treats a code line in the program.This line is:
V=V OR (INP(BASE0 + 1) AND &H10)*(2^(8-CLK))/&H10 .With Qbasic, a zero
input voltage reads zero but with Powerbasic it reads 2.5 volts.
I do not understand the mathematics of this code, so if any reader
has any ideas as to whether this code is the problem or anything else I
would be grateful.
Frank Williams
Taranaki
New Zealand
[email protected]
PS I also use Powerbasic for Windows-It is a great program!
------------------
Comment