|
|
Parallel Port Pins and Registers
PARALLEL PORT ADDRESSES
| PORT | common address |
| LPT 1 | 378h - 37Fh |
| LPT 2 | 278h - 27Fh |
ADDRESS: BASE + 0
NAME: DATA PORT
write / read/write
| bit # | name |
| 0 | D0 |
| 1 | D1 |
| 2 | D2 |
| 3 | D3 |
| 4 | D4 |
| 5 | D5 |
| 6 | D6 |
| 7 | D7 |
|
ADDRESS: BASE + 1
NAME: STATUS PORT
read only
| bit # | name |
| 0 | reserved |
| 1 | reserved |
| 2 | /IRQ |
| 3 | ERROR |
| 4 | SELECT-IN |
| 5 | PAPER-OUT |
| 6 | ACK |
| 7 | /BUSY |
|
ADDRESS: BASE + 2
NAME: CONTROL PORT
read/write
| bit # | name |
| 0 | STROBE |
| 1 | LINEFEED |
| 2 | INIT |
| 3 | SELECT |
| 4 | enable IRQ (ACK) |
| 5 | enable bi-dir mode |
| 6 | unused |
| 7 | unused |
|
NOTES:
* DATA PORT is read/write if in bi-directional mode
* Inverted or not inverted ? e.g. in the pin listing we've got /STROBE. In the
register table we've got STROBE. Therefore if the bit in the CONTROL PORT is 0, the pin is 1 and vice versa.
Same for the input: 0 on the port pin, means a 1 in the bit.
PARALLEL PORT PINS
| pin # (SUB-D 25) | pin # (centronics) | signal |
direction I/O | register | inverted |
| 1 | 1 | /STROBE | I/O | CONTROL | Y |
| 2 | 2 | D0 | O | DATA | N |
| 3 | 3 | D1 | O | DATA | N |
| 4 | 4 | D2 | O | DATA | N |
| 5 | 5 | D3 | O | DATA | N |
| 6 | 6 | D4 | O | DATA | N |
| 7 | 7 | D5 | O | DATA | N |
| 8 | 8 | D6 | O | DATA | N |
| 9 | 9 | D7 | O | DATA | N |
| 10 | 10 | /ACK | I | STATUS | N |
| 11 | 11 | BUSY | I | STATUS | Y |
| 12 | 12 | PAPER-OUT/END | I | STATUS | N |
| 13 | 13 | SELECT | I | STATUS | N |
| 14 | 14 | /LINEFEED | I/O | CONTROL | Y |
| 15 | 32 | /ERROR - /FAULT | I | STATUS | N |
| 16 | 31 | /INIT | I/O | CONTROL | N |
| 17 | 36 | /SELECT-PRT /SELECT-IN | I/O | CONTROL | Y |
| 18 - 25 | 19-30 | GROUND | GND | N | N |
inverted = Y means that that pin is inverted by the hardware.
Last-Modified: Sat, 04 Feb 2006 16:40:19 GMT
|
|