View Full Version : Printer Port

02-11-2002, 07:28 PM
I am writing a program for dos in C++ that would controll a printer port ( send and recieve data ). Connected to the printer port would be a set of IR sensors and LED's. But the problem is that I dont know how to controll the port's pins. My plan is to create a lap counter for our HO, four lane, slotcar track.

Code/examples would be of great help!

02-13-2002, 05:17 PM
I'm trying to about the same thing and have found NO one who can actually help......

02-14-2002, 10:12 AM
In the good old days of DOS, controlling the printer port was easy. outp(port,byte) would send a byte to the port.
outp(0x378,byte) sends the byte to the printer port.

This may or may not work in Win9X but most likely will not work in NT,2000 or XP.

Hope this helps

BTW 0x378 is the printer port on most computers.