Electronic – How to use Control Register inputs of LPT port

parallelport

I would like to use Control Register controlled pins of LPT (1, 14, 16, 17) as inputs. These are said to be normally used as open collector outputs, but have the ability to operate as inputs too. This site describes the use of this pins as inputs, but I'm a bit confused and don't really understand what I'm supposed to do.

Here's what the circuit looks so far. This fails for Control Register pins, but works for Status Register pins (10, 11, 12, 15). How do I need to change my schematic to make it work for with the other ones?

Best Answer

With those bi-directional LPT pins, if the open-collector output is active, it will prevent you from reading anything but a 0 from the pin.

With your circuit, if you ground that input that goes to pin 1 of your opto isolator, and pin 5 of the opto doesn't float up to +5 (while connected to the LPT port), it means the output driver of the LPT port is active, in which case you should be able to modify your software to turn it off.

What I'm getting at is mentioned on the beyond logic web page you mentioned: "the Control Port must be set to xxxx0100 to be able to read data, that is all pins to be +5v at the port so that you can pull it down to GND (logic 0)."