How can I read and write bits to the parallel port?
How can I read and write bits to the parallel port?
You need to specify your OS.
You need to specify your compiler.
If you understand what you're doing, you're not learning anything.
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.
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.
what about using windows 95/98 and MS visual studio 6? any tips or links?
or useing windows with dec-cpp?
"Build a man a fire, and he'll be warm for a day. Set a man on fire, and he'll be warm for the rest of his life."
"They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance."
"Light thinks it travels faster than anything but it is wrong. No matter how fast light travels, it finds the darkness has always got there first, and is waiting for it."
[all]- Terry Pratchett
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).
Currently Reading:
Mathematic from the birth of numbers,
Effective TCP/IP programming,
Data Compression: The Complete Reference,
C Interfaces and Implementations: Techniques for Creating Reusable Software,
An Introduction to Genetic Algorithms for Scientists and Engineers.
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).