UM82C11-C Bidirectional Printer Port Modification
=================================================
This is a bidirectional modification for computers using the 82C11 for their
parallel ports. Please note that we give no guarantee that it will work or
that everything is correct! Proceed at your own risk! (There is only one
mistake as far as we know, but everybdy knows how easy it is to make a typo.)
NOTE: An asterix (*) in front of a control signal indicates a negative true
signal (low = 1). eg. CS=true when high, *CS=true when low.
The UM82C11-C is almost a one chip IBM pc printer interface. It includes
all the the registers and buffers for a printer port and needs only some
address decoding and a LS245 buffer to hook a PC to a printer (plus some wire
of course). It comes in two packages - a 40 pin dual in line (DIP) package,
and a 44 lead flat pak. The pin numbers referred to below are for the DIP
package. There is a pinout for both packages at the end of this article.
Pin 19 on this chip is the Printer Data Output Enable (*POE). The printer
data buffers drive the printer data bus when this pin is grounded. On my
machine, and probably many others, this pin is simply connected to pin 20
(Ground) next to it to permanently enable the printer data bus. This pin
needs to be controlled by the D5 output of the printer control word to make
the port bidirectional. Unfortunately the printer control word is internal
to this chip and we can't simply add a couple of jumpers (as suggested in
Steve Ciarcia's article in Byte-Sept/88, pp 304-305,310)
On examining the truth table and some timing diagrams in the spec sheets we
find that when *CS and DIR are low and A1 is high we can use the rising edge
of *IOW to latch the printer control word. After detailed analysis and
consideration of our junkbox the following design presented itself. We used
a 74LS10 triple 3 input NAND gate as a decoder and a 74LS379 Quad D flip-flop
with Clock enable to latch the data.
Schematic Diagram
=================
74LS10 74LS379
------\
(8)DIR --------|1 \ D5(14) /-------tie
/-|2 12>0---\ | | | |
(40)+5v--\/\/\-+-|13 / | ------------------------
4k7 | ------/ | | 4 (D0) 5 12 13 |
| ------\ | (6) *IOW ---|9 (CP) (D1,D2,D3)|
tie ----+-|3 \ | | |
\-|4 6>0-\ | /--|1(*CE) |
(18)*CS --------|5 / | | ------\ | | 2 (Q0) |
------/ | \-|11 \ | ------------------------
\---|9 8>0--/ |
(39) A1 -----------------------|10 / *POE (19)
------/
(40) +5 --(LS10-14, LS379-16) A 0.01uf decoupling capacitor was added
(20)GND --(LS10--7, LS370--8) between +5 and GND.
(The numbers in paranthesis are the pin numbers on the 82C11.)
Wiring Diagram
==============
40 39 40 6
+5 A1 +5 *IOW
| /---\ | /-\ /---\ | |
| tie | | | | | | | | tie tie |
------------------------|--- | --------------------------------
|14 13 12 11 10 9 | 8| | |16 15 14 13 12 11 10 9|
|+5 | | | | |
| | | | | |
|1 2 3 4 5 6 | 7| | | 1 2 3 4 5 6 7 8|
------------------------|--- | --------------------------------
| tie tie tie | | | | | | | | tie |
| | \-/ | \---/ | | |
DIR *CS GND *POE D5 GND
18 18 20 19 14 20
(40) +5 --/\/\/--tie (All pins marked tie are pulled up to +5v through
4k7 this resister. (4.7k ohms))
(40) +5 ---||---GND(20) (This capacitor is connected across the supply
10n for decoupling. (.01 uf))
I built this circuit on a small piece of perf board and hot melt glued it on
top of the 82C11. The wires were kept as short as possible and tack soldered
to the pins of the 82C11. The circuit board trace connecting pin 19 to GND
(pin 20) was cut. The printer seems to work fine and the CHECKDDT program
reports that my printer port is now bidirectional. I have yet to finish
constructing the DDT51 to see if it really is working as it needs to, but I
don't see any reason why it shouldn't be.
The next challenge is to see if this can be reduced to one IC. A PAL or
something similar should be easy to program for this.
-------------------------------------------------------
Alternate Schematic Diagram (untried)
=====================================
This should do the same thing, and the parts might be more common.
----------
(14) D5 -----------------------------------|2 5|---------*POE (19)
| |
------\ ------------- | 74LS74 |
(8)DIR -------O|4 \ | 15|O---|3 |
(18)*CS -------O|5 >O| | | 1 4 |
(39) A1 --------|6 / | 74LS138 | ----------
------/ | | | |
(6)*IOW -----------------|1 | \--+--/\/\/\---+5v
/---|2 | 4k7
GND ---+---|3 |
-------------
(40) +5 --(LS14-14, LS138-16)
(20)GND --(LS14--7, LS138--8)
(The numbers in paranthesis are the pin numbers on the 82C11.)
-------------------------------------------------------
Data on the 82C11
=================
UM82C11-C pinout
================
This is the 40 pin Dual in Line package.
___________
Crystal in x1 | 1 40| Vdd Power Supply +5v
Crystal in x2 | 2 39| A1 System Address 1
Clock out CLK | 3 38| A0 System Address 0
Clock / 10 DCLK | 4 U 37| P0 Printer Data Bus 0
Reset RST | 5 M 36| P1 |
I/O Write *IOW | 6 8 35| P2 |-Data to Printer
I/O Read *IOR | 7 2 34| P3 |
Direction DIR | 8 C 33| P4 |
System Data Bus D0 | 9 1 32| P5 |
| D1 |10 1 31| P6 |
| D2 |11 - 30| P7 Printer Data Bus 7
| D3 |12 C 29| *ERROR Error input from printer
| D4 |13 28| SLCT Select input from printer
| D5 |14 27| PE Paper end input from printer
| D6 |15 26| *ACK Acknowledge input from printer
System Data Bus D7 |16 25| BUSY Busy input from Printer
Interrupt IRQ |17 24| *STROB Strobe output to Printer
Chip Select *CS |18 23| *AUTOFD Printer feeds one line after printng
Data output En *POE |19 22| *INIT Initialize printer
Ground (0v) Vss |20 21| *SLCT Select Printer
-----------
There is also a flat pack 48 pin version of this IC. Pin 1 on the flat
pack is *IOW and the pins follow the same sequence around the package with
four not connected pins (pins 40-43) between VDD and X1.
P0 *SLCT
36 25
------------------
A0 37| |24 PE
| |
(4 NC lines | |
pins 40-43) | |
| |
RST 48| |13 D7
----------------/
1 12
*IOW D6
The data sheets give the following truth table for the operation of this chip:
Input Output Operation:
*CS A1 A0 *IOR *IOW DIR
1 x x x x 0 Inactive (x=don't care)
1) 0 0 0 1 0 0 Write Data to Printer
2) 0 0 0 0 1 1 Read data on printer Bus
3) 0 0 1 0 1 1 Read Status from Printer
4) 0 1 0 1 0 0 Write Control word to the printer
5) 0 1 0 0 1 1 Read control word on Printer control bus
0 1 1 0 x x *****Illegal operation*****
0 ---Others--------------- No Action
The 82C11 supports 5 commands: (Addresses are for LPT1).
1) Write data to printer (Out &H378,data) The data written to the 82C11 is
latched into the output register. *POE enables or disables the data from
being driven onto the printer data bus (GND=Enabled).
2) Read data from the printer bus (data = in &h378). The data on the printer
data bus is read back to the computer. If *POE is enabled(GND) this will
reflect the output data. If *POE is disabled (+5) it will reflect whatever is
on the other end of the printer data bus.
3) Read Status from the Printer (data = in &h379). The data reflects the
status of the printer status lines.
D7 = Inverted version of BUSY signal - When this goes high the
printer is ready to accept data.
D6 = *ACK - The printer pulls ACKnowledge low to indicate it has
received the data and is ready for more.
D5 = PE - Paper End - A high indicate the printer is out of paper.
D4 = SLCT - SeLeCT -This signal is high when the printer is on-line.
D3 = *ERROR - This pin indicates the printer has a problem.
D2 = Not used
D1 = Not used
D0 = Not used
4) Write Control word to the printer (out &h37a,data). Send control signals
to the printer.
D7 = Not used
D6 = Not used
D5 = Not used ***(we use this to enable/disable bidirectional)***
D4 = IRQEN - When this pin is high the 82C11 sends an Interrupt
request to PC when *ACK is asserted by the printer.
D3 = SLCT - ??
D2 = INIT - INITiate printer (reset printer)
D1 = *AUTOFD - When low the printer automatically feeds one line
after printing.
D0 = STROB - This pin is set to a 1 to tell the printer to read
the data on the printer data bus.
Pins D3, D2 and D0 are inverted between the control word and the
output pins that connect to the printer. (eg. A 1 on D0 will be
actually sent to the printer as a low on the *STROB pin)
5) Read Control word from the printer (data=in &h37a). Read what control
signals have been sent to the printer. Data bits are the same as above.
Note that this will not read what has been stored on D5.
----------------------------------------------------------
February 27, 1991
I welcome any constructive criticism. I know that I do not know everything
there is to know about the parallel port and I may have made some mistakes.
Please let me know so I can fix them.
Thank you.
David Meed (506) 375-4029
c/o NBBI
Victoria, NB
E0J 2A0