How can I read and write bits to the parallel port?
Printable View
How can I read and write bits to the parallel port?
You need to specify your OS.
You need to specify your compiler.
GCC on linux.
I need to read 4 bits in parallel using the parallel port, how can I do this? I'm using GCC on Linux.
what about using windows 95/98 and MS visual studio 6? any tips or links?
or useing windows with dec-cpp?
Using Turbo C compiler you can access the parallel port, It is possible for windows 98,I am not sure about 95.
Function name Outportb(0x378,"data");
I think that you can access things on a hardware level in and of the 9x operating systems including Me and also possible in NT, but in the 2000 release I think you were blocked out as a “security feature” the same is true for XP and 2003. As an aside the parallel port is a relay poor option for PC interfacing (that’s why its being phased out).
I read the parallel port stuff on the websites above. There was only one link to the Linux programming that I found and it was on redhat.com. http://people.redhat.com/twaugh/parp...portguide.html
There is a problem though, i'm using a different kind of linux and I do not have the /dev/parport0 in my devices, all I see is /dev/lp0
What do I do?
All I want to do is to write 1 byte of data and read 1 byte of data. has anyone done this before? I want to do this so when I write hex 01 to the port the first pin will get a high voltage on it and in a separate program I try to read the port for the pins that are tied high (resembling 1's).