Parallel port

From Wikipedia, the free encyclopedia

Jump to: navigation, search
Image:Parallel computer printer port.jpg
A DB-25 parallel printer port, as on IBM-PC style, and a few other types of computers.
Image:Centronics-36F.jpg
Micro ribbon 36 pin female, such as on printers and on some (particularly industrial and early- and pre-1980s personal) computers.

A parallel port is a type of interface found on computers (personal and otherwise) for connecting various peripherals. It is also known as a printer port or Centronics port . The IEEE 1284 standard defines the bi-directional version of the port.

Contents

[edit] Current popularity

For the most part, the USB interface has replaced the Centronics-style parallel port. Also, some printers use an ethernet connection instead. As a result, many personal computer manufacturers (beginning in the early 2000s) have begun omitting the parallel port to save cost. It is now considered to be a legacy port. For laptops, access to a parallel port is still commonly available via a docking station; and adapters are available for USB, etc.

[edit] Uses

  • Some printers
  • Zip drive
  • Some scanners
  • Some sound cards
  • Some Webcams
  • Some gamepads and joysticks
  • Peripheral devices such as EPROM programmers
  • SCSI devices via a Parallel to SCSI adapter
  • Experimental setups using the 12 TTL drivers.
  • External CD-ROM/RW drives

[edit] Implementation on IBM personal computers

[edit] Port addresses

Traditionally IBM PC systems have allocated their first three parallel ports according to the configuration in the table below.

PORT NAME Interrupt # Starting I/O Ending I/O
LPT1 IRQ 7 0x378 0x37f
LPT2 IRQ 5 0x278 0x27f
LPT3 IRQ 5 0x3bc 0x3bf

If there is an unused LPTx slot, the port addresses of the others are moved up. (For example, if a port at 0x3bc does not exist, the port at 0x378 will then become LPT1.) The IRQ lines, however, remain fixed (therefore, 0x378 at LPT1 would use IRQ 7). The port addresses assigned to each LPTx slot can be determined by reading the BIOS Data Area (BDA) at 0000:0408.

Bit to Pin Mapping for the Standard Parallel Port (SPP):

Address MSB LSB
Bit: 7 6 5 4 3 2 1 0
Base Pin: 9 8 7 6 5 4 3 2
Base+1 Pin: ~11 10 12 13 15
Base+2 Pin: ~17 16 ~14 ~1

~ indicates a hardware inversion of the bit.

[edit] Program interface

In versions of Microsoft Windows that did not use the Windows NT kernel (as well as MS-DOS and some other operating systems), programs could access the parallel port with simple outportb() and inportb() subroutine commands. In operating systems such as Windows NT and Unix (NetBSD, FreeBSD, Solaris, 386BSD, etc), the microprocessor is operated in a different security ring, and accesses to the parallel port is inhibited, unless using the required driver. This improves security and arbitration of device contention. On Linux, inb() and outb() can be used when a process is run as root.

[edit] Pinouts

Pinouts for a DB25 connector are:

Pin No (DB25) Signal name Direction Register - bit Inverted
1 nStrobe Out Control-0 Yes
2 Data0 In/Out Data-0 No
3 Data1 In/Out Data-1 No
4 Data2 In/Out Data-2 No
5 Data3 In/Out Data-3 No
6 Data4 In/Out Data-4 No
7 Data5 In/Out Data-5 No
8 Data6 In/Out Data-6 No
9 Data7 In/Out Data-7 No
10 nAck In Status-6 No
11 Busy In Status-7 Yes
12 Paper-Out In Status-5 No
13 Select In Status-4 No
14 Linefeed Out Control-1 Yes
15 nError In Status-3 No
16 nInitialize Out Control-2 No
17 nSelect-Printer Out Control-3 Yes
18-25 Ground - - -

[edit] Monodirectional parallel ports

In early parallel ports the data lines were monodirectional (data out only) so it was not easily possible to feed data in to the computer. However, a workaround was possible by using 4 of the 5 status lines. A circuit could be constructed to split each 8-bit byte into two 4-bit nibbles which were fed in sequentially through the status lines. Each pair of nibbles was then re-combined into an 8-bit byte.

[edit] See also

[edit] References


af:Parallelle poort ar:منفذ متوازي br:Porzh a-stur de:Parallele Schnittstelle es:Puerto paralelo fr:Port parallèle id:Port paralel it:Porta parallela lv:Paralēlais ports ms:Port selari nl:Parallelle poort ja:パラレルポート pl:Port równoległy pt:Interface paralela ru:LPT-порт sv:Parallellport tr:Paralel port zh:并行端口

Views
Personal tools

Toolbox