The PC parallel port

Port modes

The most important feature of the parallel port of your PC is its mode. Possible modes are SPP, PS/2, EPP and ECP.

On 286, 386 and older 486 machines, the parallel port is on a separate card (I/O card, parallel port card, Hercules video card with a built-in parallel port) and it is SPP or PS/2. If it isn't then you might find jumpers on the card to set the mode. Refer to the documentation of your card for more details.

On newer 486 and all Pentium (and above) machines, the parallel port is integrated onto the motherboard and you can set its mode in the BIOS setup. The usual aliases for the SPP mode are "Compatible", "Normal" or "Standard". "BPP" and "Extended" usually stands for the PS/2 mode and "Enhanced" for either the EPP or the ECP mode.

However, on most Pentium and above motherboards, setting the parallel port to SPP mode won't give you a true SPP port because of the slight changes in the electronical layout of the parallel port. More on this below.

Don't rely on what port mode your BIOS setup shows. Rather check the real mode of your parallel port with LPTDetect.

SPP mode means bidirectional control lines and unidirectional data lines. The X1541 cable makes use of the bidirectional control lines. PS/2 differs from SPP in that it has bidirectional data lines. EPP and ECP offers several enhanced features, that PC programs can make use of, but the control lines are not bidirectional anymore in these modes. More on this below.

Compatibility

Here's a compatibility chart between cables and parallel port of different modes:

Cable SPP PS/2 EPP/ECP
X1541 cable  yes  yes   no
XE1541 extended cable [1]  yes  yes  yes
XM1541 multitask cable  yes  yes  yes
XA1541 active cable  yes  yes  yes
XH1541 hybrid cable  yes  yes  yes
XP1541 parallel cable   no  yes  yes
PC64 cable  yes  yes  yes
  1. We found that the XE1541 extended cable doesn't work on ASUS P5A(-B) motherboards and certain laptops. It is suggested that you use the XA1541 active cable on those instead.

You can check if your parallel port is compatible with the X1541 cable with X1541Test.

Technical background information

There are three types of lines on PC parallel ports. Data lines are used to transfer data bytes between the PC and the external device; control lines are used by the PC to send control signals to the external device; status lines are used by the external device to send status signals to the PC.

From the PC side, logically, data lines should be used for both input and output, control lines for output only, and status lines for input only. But this is not exactly the case. On the early SPP parallel ports, data lines can only be used for output; this is what we call a unidirectional parallel port. Note that this expression is mainly used for the usage of the data lines. Furthermore, with a little trick, the control lines can be used not only for output but for input, as well.

On these early SPP parallel ports, the port pins are connected via open collectors to the chipset on the I/O controller card: there is a resistor between +5V and the pin and a transistor between GND and the pin. The transistor is controlled by the chipset which is, on the other hand, controlled by the software. When the corresponding port bit is set to one, the transistor opens and the resistor pulls the signal level on the pin to high, a voltage level of 3.5-4.5V. When the port bit is cleared to zero, the transistor closes and pulls the signal level to low, at 0V. The reason for this is that the transistor can pull stronger than the resistor.

On Commodore drives, the pins of the serial port are also connected via open collectors to the periphery chip. When there are open collectors on the two ends of the same cable then three possibilities exist. If both ends pull the line low then the actual signal level, that can be read by both parties, will be low. If both ends pull the line high then the result will be a high signal. However, if one end pulls the line high and the other one pulls it low then, again, because of the strength of the transistor, the signal level will become low. The PC or the Commodore machine can pull the line high and low and the drive will be able to read this signal. However, if the machine pulled the line high then the drive will also be able to signal back, by pulling the line low. This is the only way to input data from the drive and this is exactly how Commodore machines and PC's, using an X1541 interface, work.

It is still a mystery why the original parallel port, designed by IBM, is a unidirectional parallel port. The port wouldn't have been more expensive if it allowed the software to switch the data lines into input mode. Actually, many parallel port cards are designed to be bidirectional but are crippled down to unidirectional mode. The way to enable bidirectional mode on these cards is described at the end of this chapter. Such bidirectional SPP ports are often called PS/2 parallel ports.

However, with the introduction of high-speed peripherals, open collectors started to be replaced by totem poles: there are two transistors, one between +5V and the pin, the other between GND and the pin. The two transistors are controlled in an inverted way: at a time, exactly one of them is open and the other is closed. When the port bit is cleared to zero then, as before, the transistor on the GND side closes and pulls the line low. However, when the port bit is set to one then it is also a transistor that pulls the line high. This way, the high signal level is a voltage of 5V, as opposed to 3.5V-4.5V in the open collector, and the speed of switching between signal levels is also significantly higher, allowing more data to be transferred in a given interval of time.

On certain Pentium and newer 486 motherboards, the pins of the integrated parallel port are connected via totem poles to the chipset. When a totem pole in the PC pulls the line high then it does that with a transistor. If the drive tries to pull the line low, to send a signal, then it also does that with a transistor. The two transistors will be fighting against each other and the outcome is unknown: the signal level may remain at high, if the transistor on the PC side is stronger, or become low, if the transistor in the drive is the stronger one. Most of the time, the transistors in the PC seem to be stronger and, therefore, no data can be input from the Commodore drive. And it is not only totem poles that can render transfer programs unable to work. The chipset on some other motherboards doesn't even contain the circuitry needed to read the signal level on lines other than the status lines.

The new enhanced parallel ports, EPP and ECP ports, have bidirectional data lines so that data can be read from a hard disk or a scanner connected to the PC. However, as described above, their control lines are not bidirectional anymore. Additionally, on some motherboards, control lines are unidirectional even when the port is switched to SPP mode via the BIOS setup. The X1541 cable won't work on these parallel ports. If you can't make transfer programs work with your motherboard then you should stop testing immediately, because the fights between transistors put stress on the chips on both sides. You should rather build an XE1541 cable which is slightly different from the X1541 cable and works on all kinds of parallel ports.

Turning an SPP port into PS/2

You can convert unidirectional SPP parallel port cards into a bidirectional PS/2 port by disconnecting pin 1 of the data latch 74LS374 from ground and connecting it to one of the output pins on the control latch 74LS174. This pin can be any of pins 2, 5, 7, 10, 12 or 15 and must not be connected to any other chip on the board. The corresponding input pin (3, 4, 6, 11, 13 or 14) must be connected to bit 5 of the data bus. If this is not the case on your card then you can access this bit from the data latch. Find out which one of its output pins (2, 5, 6, 9, 12, 15, 16 or 19) is connected to pin 7 of the parallel port connector and get bit 5 from the corresponding input pin (3, 4, 7, 8, 13, 14, 17 or 18).

Source: The Joe Forster-STA homepage

[Back]