by Jim Fuller
The circuit described below is a simple and inexpensive output control interface for
the Centronics printer port. Final cost per interface is less than $30.
The integrated circuit (IC) used is an eight line "Darlington Driver" coded
ULN2803. The digital state of each of the eight lines from the printer port is used to
control the IC's internal "drivers" which in turn control the LEDs. Power for
the LEDs is provided by the external battery.
Software:
The code to control output is:
[out] [port address] [output code]
where [output code] = 1, 2, 4, 8, 16, 32, 64, or 128
[port address] may be 888, or 956 depending upon your hardware configuration - if one
doesn't work, try the other.
Examples:
Pascal - Port[888] := 4;
BASIC - OUT 888,32
MswLogo - OutportB 888 64 (Version 3.7 onwards)
Component Overlay
Parts List
8 x 3mm LEDs
8 x 390 ohm 1/4 watt resistors
1 x ULN 2803
1 x PCB mount, right angled DB25 socket
1 x PCB
1 x 9 volt battery clip
1 x 25 pin male to male cable
1 x 9 volt battery
1 x 15-30 volt zener diode
NOTE: the cable must be a male-male (plug-plug) type with
'straight through' connections. ie 1 to 1, 2 to 2, 3 to 3, etc. This type of cable is
commonly used with printer switch boxes. (A "null modem" cable has lines 2 and 3
crossed and is not suitable.)
For Ordering and Pricing details see: Prices