IntroductionThe most common use for the parallel port on an IBM compatible computer was to connect a printer. In this setup, the computer puts eight bits of data out on the parallel port at a time. (The word “parallel” comes from the fact that multiple bits are sent at a time, as opposed to the serial port where one bit is sent at a time.) There are some control and status lines that can come from the printer, but in general the port is write only - it was not designed to receive data.
Device manufacturers figured out that the parallel port could be used for devices other than printers. If you were willing to use the status and control lines, you could read four bits of data at a time from the parallel port in addition to being able write eight bits at a time. Writes would be slower than reads, but could still be pretty fast compared to the serial port. All parallel ports have this capability.
IBM introduced the PS/2 line of computers in 1987, and either at the same time or shortly after IBM introduced the “PS/2 parallel port.” This parallel port was essentially the same as previous parallel ports, however it had the ability to read on the eight data lines that used to be reserved for writing. This made reads twice as fast as they had previously been, and you didn’t have to cheat and use the special purpose control and data lines to make it work.
Some implementations of the original parallel port could be modified to provide the same exact capability. In the original version of the parallel port, a chip called the 74LS374 was used. Pin 1 on the 74LS374 is called “Output Enable” and it was always tied to ground, which made the chip perform output only. Allowing this pin to “go high” would allow the existing circuit to read inputs presented to it from outside.
Although there are many ways to make this pin go high, the one way that makes the parallel port PS/2 compatible with bi-directional capability is to connect it to the pin on an unused gate on the board. If connected to a specific gate under software control at a specific address, it will be entirely PS/2 compatible.
Many years ago there was a well-known modification that described how to do this on the IBM implementation of the original parallel port. We have reviewed this modification and determined that it will work on the PCjr parallel port sidecar with no changes - the parallel port sidecar uses nearly the same implementation as the parallel port for the PC. Therefore, the instructions presented here do not break any new ground - they are just more specific for PCjr users who wish to modify their parallel port sidecar.
The modification turns your parallel port sidecar into a PS/2 compatible bi-directional parallel port. By default, the PS/2 compatible parallel port looks and smells like an original parallel port. Software can not tell the difference. Sending a particular bit sequence to an output port recognized by the PS/2 parallel port reverses the flow of data so that it can be used for reading data. Enhanced software will test for a PS/2 compatible parallel port explicitly and take advantage of it.
The beauty of the modification is the simplicity, and the fact that there is no need to try to reverse it - the default behavior is that of a standard parallel port.
The ModificationThis modification is valid on any parallel port implemented in a similar way, however it is tailored to the PCjr parallel port sidecar. Before modifying the sidecar, your parallel printer card, or anything else on your computer, do you homework:
Steps for the modification
Testing the modificationFirst and most important, your machine should boot and operate normally. You should not see flames, smoke, sparks, or anything else that would be considered abnormal. If you do, then you probably should have done a better job checking your work.
Second, the system should think that it has a normal parallel port installed. Software should behave normally. Nothing about the behavior of the system will tell you otherwise, as the BIOS doesn’t know to look for a PS/2 bi-directional parallel port.
To actually test that your modification has made a difference you will need a diagnostic program that will examine your system hardware and tell you what it finds. Or you can find a program that will detect and make use of a bi-directional parallel port if one is found. Lastly, you may write a simple program to test it.
Here is a simple BASIC program that will do the test:
How it worksI can’t hold a candle to the people who originally developed this modification, but I will try to explain it in layman’s terms. If you want a deeper explanation, refer to the data sheets for the chips and the PCjr Technical Reference manual.
The 74LS374 is a “latch”, meaning that it can be set to remember data sent to it. It remembers a byte of data at a time. As wired from the factory, the 74LS374 only writes - it can not read. It is constantly putting data on the bus. This presents a problem if an outside source also tries to put data on the bus; electrically that is not a good thing. Wiring the Output Enable pin to the 74LS174 puts that pin under software control; now the latch is not constantly asserting itself on the data bus. This allows data coming from outside the computer to be read by the system.
Pin 15 on the 74LS174 is unused in the original design. It is connected to a gate that is under software control. The address of the gate is bit 5 of the 2nd port address associated with the parallel port. Setting this bit to 1 enables reads from the parallel port, while setting it to 0 enables writes to the parallel port. The BIOS of a machine normally initializes it to zero, which puts it in output mode, just like a normal parallel port.
Mark F. Bower, for his instructions posted in the comp.sys.ibm.pc.hardware newsgroup on July 10th, 1991. Mark posted the modification for the original IBM PC parallel printer port.
"If I have seen further it is by standing on the
- Sir Isaac Newton
Created December 2nd 2002, Last updated June 30th, 2008
(C)opyright Michael B. Brutman, mbbrutman at gmail.com
Return to Mike's IBM PCjr Page main page