Hello everyone,
I've written a program that should read and write to the parallel port of my pc. I need to read input from several sensors / devices, as well as actuate certain processes through that interface as well. I've done this fairly easily on a Linux machine, but for some reason it's not so easy to do it in Windows. Apparently I need to code / download some driver, and then have it configured. This sounds like too much work that I hadn't anticipated, my project is already in the red, I cannot afford to spend any more time on this. If anyone can help, I'd be eternally greatful.
The program has to poll the parallel port and execute appropriate routines if it detects an interrupt.
This is all I get:
byte = 127
byte = 127
.........
byte = 127
where byte is defined as:
......
#define status 0x379
.....
byte = inportb(status); /*
printf("byte = %d\n", byte);
.......
The value of byte in the above example does NOT ever change, even if I change the values of the status inputs (ie. aknowledge, error, etc). I even thought my printer port was stuffed, but I reconnected my printer and was able to print just fine.
Any help would be welcome. Thanks.
Limpho Mothae