
Interfacing the Standard Parallel Port http://www.senet.com.au/~cpeacock
Interfacing the Standard Parallel Port Page 8
An external 4.7k resistor can be used to pull the pin high. I wouldn't use anything lower, just in
case you do have an internal pull up resistor, as the external resistor would act in parallel giving
effectively, a lower value pull up resistor. When in high impedance state the pin on the Parallel Port is
high (+5v). When in this state, your external device can pull the pin low and have the control port
change read a different value. This way the 4 pins of the Control Port can be used for bi-directional
data transfer. However 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).
Bits 4 & 5 are internal controls. Bit four will enable the IRQ (See Using the Parallel Ports
IRQ) and Bit 5 will enable the bi-directional port meaning that you can input 8 bits using (DATA0-7).
This mode is only possible if your card supports it. Bits 6 & 7 are reserved. Any writes to these two
bits will be ignored.
Bi-directional Ports
The schematic diagram below, shows a simplified view of the Parallel Port's Data Register.
The original Parallel Port card's implemented 74LS logic. These days all this is crammed into one
ASIC, but the theory of operation is still the same.
The non bi-directional ports were manufactured with the 74LS374's output enable tied
permanent low, thus the data port is always output only. When you read the Parallel Port's data
register, the data comes from the 74LS374 which is also connected to the data pins. Now if you can
overdrive the '374 you can effectively have a Bi-directional Port. (or a input only port, once you blow
up the latches output!)
What is very concerning is that people have actually done this. I've seen one circuit, a scope
connected to the Parallel Port distributed on the Internet. The author uses an ADC of some type, but
finds the ADC requires transistors on each data line, to make it work! No wonder why. Others have
had similar trouble, the 68HC11 cannot sink enough current (30 to 40mA!)
Commentaires sur ces manuels