A computer uses various input/output ports to talk to peripheral equipment
such as printers, monitors, keyboards or modems just to name a few. The printer
ports provide two-way communications between the printer and the computer. The
computer sends printing codes to the printer. At the same time, it also has to
receive status report from the printer end (page feed or busy signals etc). We
are making use of this channel to link between the computer and the LCD. In
general, there are three addresses defined for the computer to exchange
informations (8 bits data) with the printer.
Printer Port Addresses and Pins Definitions
(DB-25 printer port pin #)
X marks unassessible bits from the port.
According to printer standards, bits B7, A0,A1 and A3 are inverted.
Pins 18 to 25 of the printer port are common negative terminals.
Depending on system settings, the three printer port address set could be
hex 03BC, 03BD and 03BE. (decimal 956, 957, 958) Popular diagnostic routines
like MSD will tell you your system printer port addresses. Another simple way
to find out your printer port addresses would be running the following test
BASIC program with your circuit.
10 REM testing printer 8-bits output port address (378 or 3BC)
20 REM turn all 8 LEDs ON by sending out all bits=1 (hex FF=binary
30 REM turn all 8 LEDs OFF by sending out all bits=0 (hex00=binary
40 out &h378,&hFF
If you could change your led states on board
with the above testing routine, you have the right address. If not, you select
the alternate set as your system's.