"Interfacing the IBM PC parallel printer port" - читать интересную книгу автора (Stewart Z.)

Sourcing Load (up to 2.6 mA @ 2.4 v)
|-
Ground ------+

If you have an external +5 volt supply, you have two options: use the Data
Out pins to sink up to 24 mA from your +5 volt supply, or use buffer chips
to control (source or sink) more current (or higher voltages). I have
used an exteranl 5 Volt supply (regulated wall wart) plus optocoupled solid
state relays as the "load", to control AC voltages (keep the high AC voltages
away from any of this logic level stuff, obviously).

+------------------------------- (+5 v)
|+
Sinking Load (up to 24 mA @ 4.2v)
|- Power Supply
Dn Out ------+

Ground -------------------------------------- ( Gnd)

Use limiting resistors if you need to limit the current.

If the load were an LED (or optocoupler) through which you wished to put
20 mA, do the calculations. The Dn Output will probably be around 0.7
volts, so you have about 4.3 volts of drop; the LED will drop about 1.9 v
(check specs!), leaving 2.4 V to be dropped by a resister at 20 mA: 120
ohms. Test and measure, adjust to fit.

You can also use the Control Out pins. They can't source much of anything
(about 1 mA through the 4.7K resistors to +5), and can only sink about 7mA.
(The LS TTL gate actually sinks 8 mA, but one is taken up by the 4.7 K
resistor to +5). Again, check on clones with different electical specs.
This can control TTL inputs fine, and might be able to run an optocoupler
or solid state relay in sink mode (depends on the device).

In one application, I used two 74ACT374 latches, which can source 48 mA
or sink 64 mA. I connected the 8 inputs of each to the Data Out, and the
latch clocks to two Cn outputs. In software, I put out 8 bits of data
on the Data Out port, pulsed a Cn bit to latch it into one 74ACT374,
put the next 8 bits out on Data Out, and used the other Cn bit to latch it
into the other 74ACT374 - voila, 16 bits of 64mA output control. Of course,
this took a separate +5 V power supply ($5 surplus regulated wall wart).

If you can still find an old TTL parallel port (especially with sockets),
you can substitute the 74ACT374 chip for the original 74LS374 and get better
drive capability. The back of magazine suppliers were selling *fully
socketed* TTL based parallel ports for about $15 a few years back; by cutting
a trace and soldering a jumper you could make them bidirectional; by plugging
in a $1 chip you could make them source/sink 48/64 mA. You might still find
such TTL parallel port cards in old PCs. Typically, one designed for the
original PC will still work fine on the ISA bus of your 486DX2-66, so don't