next up previous
Next: A simple example: reading Up: number5 Previous: Introduction

The PC parallel port revisited

First lets take another look at Table 1 (repeated from the first column, FD Vol. XVII, Number 5),

DB-25 Pin Signal Direction Port Bit
1 Strobe$^*$ out #Command 0
2 Data$_0$ out #Data 0
3 Data$_1$ out #Data 1
4 Data$_2$ out #Data 2
5 Data$_3$ out #Data 3
6 Data$_4$ out #Data 4
7 Data$_5$ out #Data 5
8 Data$_6$ out #Data 6
9 Data$_7$ out #Data 7
10 Ack$^*$ in #Status 6
11 Busy in #Status 7
12 Paper_out in #Status 5
13 Select_out in #Status 4
14 Auto_Feed$^*$ out #Command 1
15 Error$^*$ in #Status 3
16 Init$^*$ out #Command 2
17 Select_in$^*$ out #Command 3
18 to 25 Ground NA NA NA

Table 1. The PC parallel Port.

So far we have only concerned ourselves with the #Data output port lines (and the Busy status input line). We will now use those other lines. We will presume the lowest common denominator type of port and that the data direction of the pins of #Data is fixed to input only. The 5 pins of the #Status port are usually fixed to output only. The 4 pins of the #Command port are open collector. An open collector line can be treated somewhat like a bus, with many devices (also open collector) that can potentially drive it. The state of an open collector line will be high only if none of the connected devices are driving it low (a pullup resistor, typically a value like 2.2K$\Omega$, between the line and 5 volts should be used to assure that the line is well defined when not being pulled low). The open collector lines can be used as either input or output lines.


next up previous
Next: A simple example: reading Up: number5 Previous: Introduction
Skip Carter 2008-08-20