In article <4dd0bf$...@grovel.iafrica.com>,
atkin...@iafrica.com (John Atkinson) wrote:
Quote
>Hi all,
Hi!
>Can anyone help - i am having trouble reading data in from the parallel
>port. I can write to it ok. I am using the "port" command with absolute
>addressing.
>If I write to the port and then read from it I can onle see the last written
>byte - When I pull the lines high and low manually the pgm doesnt see it..
Umm, I'm not too sure, but most printer ports are one way only.
Only the latest generation of PC:s have bidirectional ports, and they can
usually be configured in the initial setup.
The information you read is in the buffer for the printer port and since your
port probably is unidirectional, any external changes of the port won't show.
However, there are two solutions that I know of:
1: There are five ingoing pins on a printer port (paper out, busy etc),
if all you need is 5 bits or less, then you can utilize these instead.
I can't remember the exact portnumber for this one, but I think it will be
a bit above the write port (1-8 above adresswise)
2: Buy a new parallell port with the ability to talk in both directions,
I have not tried one of these, but I assume they use the standard port for
incoming data...
If you _have_ a bidirectional port, well then I guess I'm a bit at a loss. ;)
Greetings types Jonas Eriksson, PC systems guru, Photoshopper and roleplayer.
/----------- Thought of the day ---------------------------------------------\
| "For every action, there is an equal but opposite critical analysis." |
\-------------------------------------------------- Solomon Short -----------/
Mail:jo...@pinus.slu.se Talk:Gladly, if i am online that is...
Tel:018-300870 http://jeriksson.lpul.slu.se/jonas/jonas.htm (when up)