Digital Electronics: How to Design a Parallel-Port Circuit
Each of the eight data output pins on a parallel port provides 5 V DC to your electronic circuit. That amount of voltage can source about 10 mA or 12 mA — enough to drive an LED directly. Alternatively, you can connect the data output to the base of a switching transistor, which allows you to control circuits that require more current.
The first circuit drives an LED directly. A current-limiting resistor is required to prevent the LED from pulling too much current and damaging the LED, the parallel port itself, or both.
The second circuit shows how to use a transistor to switch a circuit by using the output from a parallel-port data pin. As you can see, the data pin is connected through a resistor to the transistor’s base. When the data pin goes high, the transistor is turned on, allowing current to flow through the collector-emitter circuit.
Using a transistor driver this way provides two benefits:
The transistor can switch more than the 10–12 mA that the parallel port’s data pin can source directly.
The collector-emitter circuit can operate at a different voltage from the one that the data pin’s +5 V HIGH signal provides.