Is an interface between a computer and a printer that enables the computer to transfer multiple bits of information to the printer simultaneously?

Course Hero uses AI to attempt to automatically extract content from documents to surface to you and others so you can study better, e.g., in search results, to enrich docs, and more. This preview shows page 1 - 2 out of 4 pages.

Computer interface

Is an interface between a computer and a printer that enables the computer to transfer multiple bits of information to the printer simultaneously?
Parallel port

A DB-25 connector often used for a parallel printer port on IBM PC compatible computers, with the printer icon.

Type Point-to-pointProduction historyDesigner Centronics, IBMDesigned 1970–1981Manufacturer Centronics, Dataproducts, Intel, IBM, Compaq, Nortel, etcSuperseded by USB (1996)General specificationsLength 2.3 cm (0.91 in)Hot pluggable Usually notExternal YesCable Usually up to 25 wires including ground; optionally shieldedPins 8 data, 4 output control, 5 input control, 8 groundConnector DB-25, DB25F, "Centronics" 36-pin Amphenol, DC-37, othersElectricalSignal 0 to +5.0 volt DCEarth Dedicated pinsMax. voltage 5 volts DCDataData signal ParallelWidth VariableBitrate PP: 150 kB/s,[1]
EPP: 2 MB/s
ECP: 2.5 MB/sMax. devices 2Protocol Application dependentPinout
Is an interface between a computer and a printer that enables the computer to transfer multiple bits of information to the printer simultaneously?
IBM PC-compatible parallel port pinout

Is an interface between a computer and a printer that enables the computer to transfer multiple bits of information to the printer simultaneously?

Micro ribbon 36-pin female, such as on printers and on some computers, particularly industrial equipment and early (pre-1980s) personal computers.

Is an interface between a computer and a printer that enables the computer to transfer multiple bits of information to the printer simultaneously?

Mini-Centronics 36-pin male connector (top) with Micro ribbon 36-pin male Centronics connector (bottom)

Is an interface between a computer and a printer that enables the computer to transfer multiple bits of information to the printer simultaneously?

The Apple II Parallel Printer Port connected to the printer via a folded ribbon cable; one end connected to the connector at the top of the card, and the other end had a 36-pin Centronics connector.

In computing, a parallel port is a type of interface found on early computers (personal and otherwise) for connecting peripherals. The name refers to the way the data is sent; parallel ports send multiple bits of data at once (parallel communication), as opposed to serial communication, in which bits are sent one at a time. To do this, parallel ports require multiple data lines in their cables and port connectors and tend to be larger than contemporary serial ports, which only require one data line.

There are many types of parallel ports, but the term has become most closely associated with the printer port or Centronics port found on most personal computers from the 1970s through the 2000s. It was an industry de facto standard for many years, and was finally standardized as IEEE 1284 in the late 1990s, which defined the Enhanced Parallel Port (EPP) and Extended Capability Port (ECP) bi-directional versions. Today, the parallel port interface is virtually non-existent in new computers because of the rise of Universal Serial Bus (USB) devices, along with network printing using Ethernet and Wi-Fi connected printers.

The parallel port interface was originally known as the Parallel Printer Adapter on IBM PC-compatible computers. It was primarily designed to operate printers that used IBM's eight-bit extended ASCII character set to print text, but could also be used to adapt other peripherals. Graphical printers, along with a host of other devices, have been designed to communicate with the system.

History

Centronics

An Wang, Robert Howard and Prentice Robinson began development of a low-cost printer at Centronics, a subsidiary of Wang Laboratories that produced specialty computer terminals. The printer used the dot matrix printing principle, with a print head consisting of a vertical row of seven metal pins connected to solenoids. When power was applied to the solenoids, the pin was pushed forward to strike the paper and leave a dot. To make a complete character glyph, the print head would receive power to specified pins to create a single vertical pattern, then the print head would move to the right by a small amount, and the process repeated. On their original design, a typical glyph was printed as a matrix seven high and five wide, while the "A" models used a print head with 9 pins and formed glyphs that were 9 by 7.[2]

This left the problem of sending the ASCII data to the printer. While a serial port does so with the minimum of pins and wires, it requires the device to buffer up the data as it arrives bit by bit and turn it back into multi-bit values. A parallel port makes this simpler; the entire ASCII value is presented on the pins in complete form. In addition to the eight data pins, the system also needed various control pins as well as electrical grounds. Wang happened to have a surplus stock of 20,000 Amphenol 36-pin micro ribbon connectors that were originally used for one of their early calculators. The interface only required 21 of these pins, the rest were grounded or not connected. The connector has become so closely associated with Centronics that it is now popularly known as the "Centronics connector".[3]

The Centronics Model 101 printer, featuring this connector, was released in 1970.[3] The host sent ASCII characters to the printer using seven of eight data pins, pulling them high to +5V to represent a 1. When the data was ready, the host pulled the STROBE pin low, to 0 V. The printer responded by pulling the BUSY line high, printing the character, and then returning BUSY to low again. The host could then send another character. Control characters in the data caused other actions, like the CR or EOF. The host could also have the printer automatically start a new line by pulling the AUTOFEED line high, and keeping it there. The host had to carefully watch the BUSY line to ensure it did not feed data to the printer too rapidly, especially given variable-time operations like a paper feed.[2][4]

The printer side of the interface quickly became an industry de facto standard, but manufacturers used various connectors on the system side, so a variety of cables were required. For example, NCR used the 36-pin micro ribbon connector on both ends of the connection, early VAX systems used a DC-37 connector, Texas Instruments used a 25-pin card edge connector and Data General used a 50-pin micro ribbon connector. When IBM implemented the parallel interface on the IBM PC, they used the DB-25F connector at the PC-end of the interface, creating the now familiar parallel cable with a DB25M at one end and a 36-pin micro ribbon connector at the other.

In theory, the Centronics port could transfer data as rapidly as 75,000 characters per second. This was far faster than the printer, which averaged about 160 characters per second, meaning the port spent much of its time idle. The performance was defined by how rapidly the host could respond to the printer's BUSY signal asking for more data. To improve performance, printers began incorporating buffers so the host could send them data more rapidly, in bursts. This not only reduced (or eliminated) delays due to latency waiting for the next character to arrive from the host, but also freed the host to perform other operations without causing a loss of performance. Performance was further improved by using the buffer to store several lines and then printing in both directions, eliminating the delay while the print head returned to the left side of the page. Such changes more than doubled the performance of an otherwise unchanged printer, as was the case on Centronics models like the 102 and 308.[4]

IBM

IBM released the IBM Personal Computer in 1981 and included a variant of the Centronics interface— only IBM logo printers (rebranded from Epson) could be used with the IBM PC.[5] IBM standardized the parallel cable with a DB25F connector on the PC side and the 36-pin Centronics connector on the printer side. Vendors soon released printers compatible with both standard Centronics and the IBM implementation.

The original IBM parallel printer adapter for the IBM PC of 1981 was designed to support limited bidirectionality, with 8 lines of data output and 4 lines of data input.[citation needed] This allowed the port to be used for other purposes, not just output to a printer. This was accomplished by allowing the data lines to be written to by devices on either end of the cable, which required the ports on the host to be bidirectional. This feature saw little use, and was removed in later revisions of the hardware. Years later, in 1987, IBM reintroduced the bidirectional interface with its IBM PS/2 series, where it could be enabled or disabled for compatibility with applications hardwired not to expect a printer port to be bidirectional.

Bi-Tronics

As the printer market expanded, new types of printing mechanisms appeared. These often supported new features and error conditions that could not be represented on the existing port's relatively few status pins. While the IBM solution could support this, it was not trivial to implement and was not at that time being supported. This led to the Bi-Tronics system, introduced by HP on their LaserJet 4Si in April 1993.[6] This used four existing status pins, ERROR, SELECT, PE and BUSY to represent a nibble, using two transfers to send an 8-bit value. Bi-Tronics mode, now known as nibble mode, was indicated by the host pulling the SELECT line high, and data was transferred when the host toggles the AUTOFEED low. Other changes in the handshaking protocols improved performance, reaching 400,000 cps to the printer, and about 50,000 cps back to the host.[7] A major advantage of the Bi-Tronics system is that it can be driven entirely in software in the host, and uses otherwise unmodified hardware - all the pins used for data transfer back to the host were already printer-to-host lines.

EPP and ECP

The introduction of new devices like scanners and multi-function printers demanded much more performance than either the Bi-Tronics or IBM style backchannels could handle. Two other standards have become more popular for these purposes. The Enhanced Parallel Port (EPP), originally defined by Zenith Electronics, is similar to IBM's byte mode in concept, but changes details of the handshaking to allow up to 2 MB/s.[8] The Extended Capability Port (ECP) is essentially an entirely new port in the same physical housing that also adds direct memory access based on ISA and run-length encoding to compress the data, which is especially useful when transferring simple images like faxes or black-and-white scanned images. ECP offers performance up to 2.5 MB/s in both directions.[9]

All of these enhancements are collected as part of the IEEE 1284 standard. The first release in 1994 included original Centronics mode ("compatibility mode"), nibble and byte modes, as well as a change to the handshaking that was already widely used; the original Centronics implementation called for the BUSY lead to toggle with each change on any line of data (busy-by-line), whereas IEEE 1284 calls for BUSY to toggle with each received character (busy-by-character). This reduces the number of BUSY toggles and the resulting interruptions on both sides. A 1997 update standardized the printer status codes. In 2000, the EPP and ECP modes were moved into the standard, as well as several connector and cable styles, and a method for daisy chaining up to eight devices from a single port.[9]

Some host systems or print servers may use a strobe signal with a relatively low voltage output or a fast toggle. Any of these issues might cause no or intermittent printing, missing or repeated characters or garbage printing. Some printer models may have a switch or setting to set busy by character; others may require a handshake adapter.[citation needed]

Dataproducts

Dataproducts introduced a very different implementation of the parallel interface for their printers. It used a DC-37 connector on the host side and a 50 pin connector on the printer side—either a DD-50 (sometimes incorrectly referred to as a "DB50") or the block shaped M-50 connector; the M-50 was also referred to as Winchester.[10][11] Dataproducts parallel was available in a short-line for connections up to 50 feet (15 m) and a long-line version using differential signaling for connections to 500 feet (150 m). The Dataproducts interface was found on many mainframe systems up through the 1990s, and many printer manufacturers offered the Dataproducts interface as an option.

A wide variety of devices were eventually designed to operate on a parallel port. Most devices were uni-directional (one-way) devices, only meant to respond to information sent from the PC. However, some devices such as Zip drives were able to operate in bi-directional mode. Printers also eventually took up the bi-directional system, allowing various status report information to be sent.

Historical uses

Is an interface between a computer and a printer that enables the computer to transfer multiple bits of information to the printer simultaneously?

HP C4381A CD-Writer Plus 7200 Series, showing parallel ports to connect between a printer and the computer.

Before the advent of USB, the parallel interface was adapted to access a number of peripheral devices other than printers. One early use of the parallel port was for dongles used as hardware keys which were supplied with application software as a form of software copy protection. Other uses included optical disc drives such as CD readers and writers, Zip drives, scanners, external modems, gamepads, and joysticks. Some of the earliest portable MP3 players required a parallel port connection for transferring songs to the device.[12] Adapters were available to run SCSI devices via parallel. Other devices such as EPROM programmers and hardware controllers could be connected via the parallel port.

Interfaces

Most PC-compatible systems in the 1980s and 1990s had one to three ports, with communication interfaces defined like this:

  • Logical parallel port 1: I/O port 0x3BC, IRQ 7 (usually in monochrome graphics adapters)
  • Logical parallel port 2: I/O port 0x378, IRQ 7 (dedicated IO cards or using a controller built into the mainboard)
  • Logical parallel port 3: I/O port 0x278, IRQ 5 (dedicated IO cards or using a controller built into the mainboard)

If no printer port is present at 0x3BC, the second port in the row (0x378) becomes logical parallel port 1 and 0x278 becomes logical parallel port 2 for the BIOS. Sometimes, printer ports are jumpered to share an interrupt despite having their own IO addresses (i.e. only one can be used interrupt-driven at a time). In some cases, the BIOS supports a fourth printer port as well, but the base address for it differs significantly between vendors. Since the reserved entry for a fourth logical printer port in the BIOS Data Area (BDA) is shared with other uses on PS/2 machines and with S3 compatible graphics cards, it typically requires special drivers in most environments. Under DR-DOS 7.02 the BIOS port assignments can be changed and overridden using the LPT1, LPT2, LPT3 (and optionally LPT4) CONFIG.SYS directives.

Access

DOS-based systems make the logical parallel ports detected by the BIOS available under device names such as LPT1, LPT2 or LPT3 (corresponding with logical parallel port 1, 2, and 3, respectively). These names derive from terms like Line Print Terminal , Local Print Terminal (both abbreviated as LPT), or Line Printer. A similar naming convention was used on ITS, DEC systems, as well as in CP/M and 86-DOS (LST).

In DOS, the parallel printers could be accessed directly on the command line. For example, the command "TYPE C:\AUTOEXEC.BAT > LPT1:" would redirect the contents of the AUTOEXEC.BAT file to the printer port. A PRN device was also available as an alias for LPT1. Some operating systems (like Multiuser DOS) allow to change this fixed assignment by different means. Some DOS versions use resident driver extensions provided by MODE, or users can change the mapping internally via a CONFIG.SYS PRN=n directive (as under DR-DOS 7.02 and higher). DR-DOS 7.02 also provides optional built-in support for LPT4 if the underlying BIOS supports it.

PRN, along with CON, AUX and a few others are invalid file and directory names in DOS and Windows, even in Windows XP. There is even an MS-DOS device in path name vulnerability in Windows 95 and 98, which causes the computer to crash if the user types "C:\CON\CON", "C:\PRN\PRN" or "C:\AUX\AUX" in the Windows Explorer address bar.[citation needed] Microsoft has released a patch to fix this bug, but newly installed Windows 95 and 98 operating systems will still have the bug.

A special "PRINT" command also existed to achieve the same effect. Microsoft Windows still refers to the ports in this manner in many cases, though this is often fairly hidden.

In SCO UNIX and Linux, the first parallel port is available via the filesystem as /dev/lp0. Linux IDE devices can use a paride (parallel port IDE) driver.[13]

Notable consumer products

Is an interface between a computer and a printer that enables the computer to transfer multiple bits of information to the printer simultaneously?

Accton Etherpocket-SP parallel port ethernet adaptor (circa 1990, DOS drivers). Supports both coax and 10 Base-T. Supplementary power is drawn from a PS/2 port passthrough cable.

  • The Iomega ZIP drive
  • The Snappy Video SnapShot video capture device[14]
  • MS-DOS 6.22's INTERLNK and INTERSRV drive sharing utility
  • The Covox Speech Thing audio device
  • The OPL2LPT and OPL3LPT audio devices

Current use

For consumers, USB and computer networks have replaced the parallel printer port, for connections both to printers and to other devices.

Many manufacturers of personal computers and laptops consider parallel to be a legacy port and no longer include the parallel interface. Smaller machines have less room for large parallel port connectors. USB-to-parallel adapters are available that can make parallel-only printers work with USB-only systems. There are PCI (and PCI-express) cards that provide parallel ports. There are also some print servers that provide an interface to parallel ports through a network. USB-to-EPP chips can also allow other non-printer devices to continue to work on modern computers without a parallel port.[15]

For electronics hobbyists the parallel port is still often the easiest way to connect to an external circuit board. It is faster than the other common legacy port (serial port), requires no serial-to-parallel converter, and requires far less interface logic and software than a USB target interface. However, Microsoft operating systems later than Windows 95/98 prevent user programs from directly writing to or reading from the LPT without additional software (kernel extensions).[16]

Current CNC Milling Machines also often make use of the parallel port to directly control the machine's motors and attachments.

IBM PC implementation

Port addresses

Traditionally IBM PC systems have allocated their first three parallel ports according to the configuration in the table below (if all three printer ports exist).

PORT NO Interrupt # Starting I/O Ending I/O
#1 IRQ 7 0x3BC[17] 0x3BF
#2 IRQ 7 0x378[17] 0x37F
#3 IRQ 5 0x278[17] 0x27F

If there is an unused 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 the first logical parallel port.)[17] The base address 0x3BC is typically supported by printer ports on MDA and Hercules display adapters, whereas printer ports provided by the mainboard chipset or add-on cards rarely allow to be configured to this base address. Therefore, in absence of a monochrome display adapter, a common assignment for the first logical parallel port (and therefore also for the corresponding LPT1 DOS device driver) today is 0x378, even though the default is still 0x3BC (and would be selected by the BIOS if it detects a printer port at this address). The IRQ lines are typically configurable in the hardware as well. Assigning the same interrupt to more than one printer port should be avoided and will typically cause one of the corresponding ports to work in polled mode only. The port addresses assigned to slot can be determined by reading the BIOS Data Area (BDA) at 0000h:0408h.

Bit-to-pin mapping for the Standard Parallel Port (SPP):

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

~ indicates a hardware inversion of the bit.

Program interface

In versions of Windows that did not use the Windows NT kernel (as well as 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 access to the parallel port is prohibited, 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 and an ioperm() command is used to allow access to its base address; alternatively, ppdev allows shared access and can be used from userspace if the appropriate permissions are set.

The cross-platform library for parallel port access, libieee1284, also is available on many Linux distributions and provides an abstract interface to the parallel ports of the system. Access is handled in an open-claim-release-close sequence, which allows for concurrent access in userspace.

Pinouts

The older parallel printer ports had an 8-bit data bus and four pins for control output (Strobe, Linefeed, Initialize, and Select In), and five more for control input (ACK, Busy, Select, Error, and Paper Out). Its data transfer speed is at 150 kB/s.[1]

The newer EPPs (Enhanced Parallel Ports) have an 8-bit data bus, and the same control pins as the normal parallel printer port. Newer ports reach speeds of up to 2 MB/s.[18][better source needed]

Pinouts for parallel port connectors are:

Is an interface between a computer and a printer that enables the computer to transfer multiple bits of information to the printer simultaneously?

Pinouts for parallel port connectors.

Pin No (DB25) Pin No (36 pin) Signal name Direction Register - bit Inverted
1 1 Strobe In/Out Control-0 Yes
2 2 Data0 Out Data-0 No
3 3 Data1 Out Data-1 No
4 4 Data2 Out Data-2 No
5 5 Data3 Out Data-3 No
6 6 Data4 Out Data-4 No
7 7 Data5 Out Data-5 No
8 8 Data6 Out Data-6 No
9 9 Data7 Out Data-7 No
10 10 Ack In Status-6 No
11 11 Busy In Status-7 Yes
12 12 Paper-Out In Status-5 No
13 13 Select In Status-4 No
14 14 Linefeed In/Out Control-1 Yes
15 32 Error In Status-3 No
16 31 Reset In/Out Control-2 No
17 36 Select-Printer In/Out Control-3 Yes
18-25 19-30,33,17,16 Ground - - -

Inverted lines are true on logic low. If they are not inverted, then logic high is true.

Pin 25 on the DB25 connector might not be connected to ground on modern computers.[dubious ]

See also

  • Device file
  • Serial port
  • Parallel communication
  • Input/output base address
  • IEEE 1284 which is sometimes called an "Enhanced Parallel Port"
  • Biostar, a Taiwanese computer component manufacturer partly known for having parallel port connectivity on their motherboards

Hardware IC chips:

  • For host computer, see Super I/O
  • For peripheral side, parallel port interface chips: PPC34C60 (SMSC) and W91284PIC (Warp Nine)
  • For USB-printer purpose, example USB chips: PL-2305 (Prolific) and CH341 (QinHeng)

References

  1. ^ a b James, Kevin. PC interfacing and data acquisition : techniques for measurement, instrumentation and control. Oxford ; Boston : Newnes, 2000. ISBN 9780750646246. p. 256
  2. ^ a b Centronics model 306 Technical Manual. Centronics. 1976.
  3. ^ a b Webster, Edward C. (2000). Print Unchained: Fifty Years of Digital Printing: A Saga of Invention and Enterprise. West Dover, VT: DRA of Vermont. ISBN 0-9702617-0-5.
  4. ^ a b Centronics 101, 120A, 101AL, 102A, 306 Printers (PDF). Archived (PDF) from the original on 2016-10-03.
  5. ^ Durda IV, Frank (2004). "Centronics and IBM Compatible Parallel Printer Interface Pin Assignment Reference". Archived from the original on 2007-09-13. Retrieved 2007-10-05.
  6. ^ HP Corporate Archives (2004-05-24). "Twenty Years of Innovation: HP LaserJet and Inkjet Printers 1984–2004" (PDF). www.hp.com. HP. Archived from the original (PDF) on 2007-12-02. Retrieved 2021-11-05.
  7. ^ "Nibble Mode". Department of Chemistry, Ajou University. Archived from the original on 2017-04-06. Retrieved 2016-10-11.
  8. ^ EP 0640229  Buxton, C.L. / Kohtz, R.A. / Zenith Data Systems Corp.: Enhanced parallel port. filing date 15 May 1992
  9. ^ a b IEEE 1284: Parallel Ports (PDF) (Technical report). Lava. 2002. Archived from the original (PDF) on 23 May 2006. Retrieved 2 November 2007.
  10. ^ "Dataproducts D-Sub 50 Parallel". Hardware Book. Archived from the original on 2007-12-14. Retrieved 2008-01-25.
  11. ^ "Dataproducts M/50 Parallel". Hardware Book. Archived from the original on 2007-12-14. Retrieved 2008-01-25.
  12. ^ Mitskaniouk, Oleg (2000-06-19). "The D-Link DMP-100 MP3 Player". Target PC Magazine. p. 2. Archived from the original on 2015-05-01. Retrieved 2012-07-20.
  13. ^ Barkakati, Naba (2006). Linux All-in-One Desk Reference For Dummies. For dummies (2 ed.). John Wiley & Sons. p. 482. ISBN 9780471793137. Retrieved 2015-09-11. Some IDE devices use a parallel port IDE adapter — that's what the PARIDE option refers to.
  14. ^ "Play Snappy Video SnapShot still-image capture adapter Series Specifications". CNET. Archived from the original on 2017-08-06. Retrieved 2017-08-06.
  15. ^ "Parallel port flatbed scanner works under USB on Win9x (Archive)". Archived from the original on 2012-06-30. Retrieved 2012-06-30.{{cite web}}: CS1 maint: bot: original URL status unknown (link)
  16. ^ "Inpout32.DLL for Windows 98/2000/NT/XP". Archived from the original on 2014-03-14. Retrieved 2014-03-14.
  17. ^ a b c d Frank Van Gilluwe, The Undocumented PC, 1994, page 703, ISBN 0-201-62277-7
  18. ^ Parallel Port Definition Archived 2013-01-03 at the Wayback Machine, Techopedia

  • Axelson, Jan (2000). Parallel Port Complete. Jan Axelson's Lakeview Research. ISBN 0-9650819-1-5.
  • The (Linux) Parallel Port Subsystem by Tim Waugh

Is an interface between a computer and a printer that enables the computer to transfer multiple bits of information to the printer simultaneously?

  • Parallel Port (from BeyondLogic.org) standard, enhanced (EPP), extended (ECP), examples[permanent dead link]
  • EPP parallel printer port data capture project
  • Linux I/O port programming mini-HOWTO
  • The Linux 2.4 Parallel Port Subsystem
  • Parallel Port interfacing with Windows NT/2000/XP
  • Parallel port complete: programming, interfacing & using the PC's parallel printer port
  • PyParallel - API for Python programming language
  • Linux ppdev reference
  • libieee1284 homepage
  • MSDN: Roadmap for Developing Parallel Device Drivers

Retrieved from "https://en.wikipedia.org/w/index.php?title=Parallel_port&oldid=1121281952"


Page 2

6-pin mini-DIN connector for connecting keyboards and mice to a PC compatible computer

Is an interface between a computer and a printer that enables the computer to transfer multiple bits of information to the printer simultaneously?
PS/2 port

The color-coded PS/2 connection ports (purple for keyboard and green for mouse)

Type Keyboard and computer mouse data connectorProduction historyDesigner IBMDesigned 1987; 35 years ago (1987)Superseded DIN connector, DE-9 connector and Mini-DIN-9 InPortSuperseded by USB (USB human interface device class)General specificationsHot pluggable NoExternal YesCable 4 wires plus shieldPins 6Connector Mini-DIN-6ElectricalSignal 5 V DCMax. voltage 5.0±0.5 VMax. current 275 mADataData signal Serial data at 10.0–16.7 kHz with 1 start bit, 8 data bits (LSB first), 1 parity bit (odd), 1 stop bit, [1 ack bit (if host-to-device)]Bitrate 7–12 kbit/sMax. devices 1 or 2[a]Protocol SerialPinout

Is an interface between a computer and a printer that enables the computer to transfer multiple bits of information to the printer simultaneously?

Female connector from the frontPin 1 +DATA DataPin 2 Not connected[b]Pin 3 GND GroundPin 4 Vcc +5 V DC at 275 mAPin 5 +CLK ClockPin 6 Not connected[c]

  1. ^ Keyboard and mouse ports may be combined into a single port which can be used to connect both by splitter cable.
  2. ^ Sometimes, mouse Data for splitter cable.
  3. ^ Sometimes, mouse Clock for splitter cable.

The PS/2 port is a 6-pin mini-DIN connector used for connecting keyboards and mice to a PC compatible computer system. Its name comes from the IBM Personal System/2 series of personal computers, with which it was introduced in 1987. The PS/2 mouse connector generally replaced the older DE-9 RS-232 "serial mouse" connector, while the PS/2 keyboard connector replaced the larger 5-pin/180° DIN connector used in the IBM PC/AT design. The PS/2 keyboard port is electrically and logically identical to the IBM AT keyboard port, differing only in the type of electrical connector used. The PS/2 platform introduced a second port with the same design as the keyboard port for use to connect a mouse; thus the PS/2-style keyboard and mouse interfaces are electrically similar and employ the same communication protocol. However, unlike the otherwise similar Apple Desktop Bus connector used by Apple, a given system's keyboard and mouse port may not be interchangeable since the two devices use different sets of commands and the device drivers generally are hard-coded to communicate with each device at the address of the port that is conventionally assigned to that device. (That is, keyboard drivers are written to use the first port, and mouse drivers are written to use the second port.[1])

Communication protocol

Each port implements a bidirectional synchronous serial channel.[2] The channel is slightly asymmetrical: it favors transmission from the input device to the computer, which is the majority case. The bidirectional IBM AT and PS/2 keyboard interface is a development of the unidirectional IBM PC keyboard interface, using the same signal lines but adding capability to send data back to the keyboard from the computer; this explains the asymmetry.[3]

The interface has two main signal lines, Data and Clock. These are single-ended signals driven by open-collector drivers at each end. Normally, the transmission is from the device to the host. To transmit a byte, the device simply outputs a serial frame of data (including 8 bits of data and a parity bit) on the Data line serially as it toggles the Clock line once for each bit. The host controls the direction of communication using the Clock line; when the host pulls it low, communication from the attached device is inhibited. The host can interrupt the device by pulling Clock low while the device is transmitting; the device can detect this by Clock staying low when the device releases it to go high as the device-generated clock signal toggles. When the host pulls Clock low, the device must immediately stop transmitting and release Clock and Data to both float high. (So far, all of this is the same as the unidirectional communication protocol of the IBM PC keyboard port, though the serial frame formats differ.) The host can use this state of the interface simply to inhibit the device from transmitting when the host is not ready to receive. (For the IBM PC keyboard port, this was the only normal use of signalling from the computer to the keyboard. The keyboard could not be commanded to retransmit a keyboard scan code after it had been sent, since there was no reverse data channel to carry commands to the keyboard, so the only way to avoid losing scan codes when the computer was too busy to receive them was to inhibit the keyboard from sending them until the computer was ready. This mode of operation is still an option on the IBM AT and PS/2 keyboard port.)[4]

To send a byte of data back to the device, the host pulls Clock low, waits briefly, pulls Data low and releases the Clock line again. The device then generates a Clock signal while the host outputs a frame of bits on the Data line, one bit per Clock pulse, similar to what the attached device would do to transmit in the other direction. However, while device-to-host transmission reads bits on falling Clock edges, transmission in the other direction reads bits on rising edges. After the data byte, the host releases the Data line, and the device will pull the Data line low for one clock period to indicate successful reception. A keyboard normally interprets the received byte as a command or a parameter for a preceding command. The device will not attempt to transmit to the host until both Clock and Data have been high for a minimum period of time.[5]

Transmission from the device to the host is favored because from the normal idle state, the device does not have to seize the channel before it can transmit—the device just begins transmitting immediately. In contrast, the host must seize the channel by pulling first the Clock line and then the Data line low and waiting for the device to have time to release the channel and prepare to receive; only then can the host begin to transmit data.

Port availability

Is an interface between a computer and a printer that enables the computer to transfer multiple bits of information to the printer simultaneously?

Is an interface between a computer and a printer that enables the computer to transfer multiple bits of information to the printer simultaneously?

Is an interface between a computer and a printer that enables the computer to transfer multiple bits of information to the printer simultaneously?

PS/2 dualport, corresponding splitter (Y-cable) and pinout (female).

Older laptops and most contemporary motherboards have a single port that supports either a keyboard or a mouse. Sometimes the port also allows one of the devices to be connected to the two normally unused pins in the connector to allow both to be connected at once through a special splitter cable.[6] This configuration is common on IBM/Lenovo Thinkpad notebooks among many others.

The PS/2 keyboard interface is electrically the same as the 5-pin DIN connector on earlier AT keyboards, and keyboards designed for one can be connected to the other with a simple wiring adapter. Such wiring adapters and adapter cables were once commonly available for sale. Note that IBM PC and PC XT keyboards use a different unidirectional protocol with the same DIN connector as AT keyboards, so though a PC or XT keyboard can be connected to PS/2 port using a wiring adapter intended for an AT keyboard, the earlier keyboard will not work with the PS/2 port. (At least, it cannot work with normal PS/2 keyboard driver software, including the system BIOS keyboard driver.)

In contrast to this, the PS/2 mouse interface is substantially different from RS-232 (which was generally used for mice on PCs without PS/2 ports), but nonetheless many mice were made that could operate on both with a simple passive wiring adapter, where the mice would detect the presence of the adapter based on its wiring and then switch protocols accordingly.

PS/2 mouse and keyboard connectors have also been used in non-IBM PC-compatible computer systems, such as the DEC AlphaStation line, early IBM RS/6000 CHRP machines and SGI Indy, Indigo 2, and newer (Octane, etc.) computers.[7] Macintosh clone computers based on the "LPX-40" logic board design featured PS/2 mouse and keyboard ports, including the Motorola StarMax and the Power Computing PowerBase.[8]

Legacy port status and USB

PS/2 is now considered a legacy port, with USB ports now normally preferred for connecting keyboards and mice. This dates back at least as far as the Intel/Microsoft PC 2001 specification of 2000.

However, as of 2022, although PS/2 ports are rarely included in off the shelf computer systems, they continue to be included on many computer motherboards and are favored by some users for various reasons including the following:

  • PS/2 ports may be favored for security reasons in a corporate environment as they allow USB ports to be totally disabled, preventing the connection of any USB removable disks and malicious USB devices.[9]
  • The PS/2 interface provides no restriction on key rollover, although USB keyboards have no such restriction either, unless operated in BOOT mode, which is the exception.
  • To free USB ports for other uses like removable USB devices.
  • Some USB keyboards may not be able to operate the BIOS on certain motherboards due to driver issues or lack of support. The PS/2 interface has near-universal compatibility with BIOS.

Latency of mice

USB mice send data more quickly than PS/2 mice because standard USB mice are polled at a default rate of 125 hertz while standard PS/2 mice send interrupts at a default rate of 100 Hz when they have data to send to the computer. However, PS2 mice and keyboards are favored by many gamers because they essentially have zero latency through the port. There is no "polling" needed by the OS. The device notifies the OS when it's time to receive a packet of data from it.[10][11]

Also, USB mice do not cause the USB controller to interrupt the system when they have no status change to report according to the USB HID specification's default profile for mice.[12] Both PS/2 and USB allow the sample rate to be overridden, with PS/2 supporting a sampling rate of up to 200 Hz[2] and USB supporting a polling rate up to 1 kHz[10] as long as the mouse runs at full-speed USB speeds or higher.

USB key rollover limitations

The USB HID keyboard interface requires that it explicitly handle key rollover, with the full HID keyboard class supporting n-key rollover. However, the USB boot keyboard class (designed to allow the BIOS to easily provide a keyboard in the absence of OS USB HID support) only allows 6-key rollover. Some keyboard peripherals support only the latter class, and some OSes may fail to switch to using the full HID keyboard class with a device after boot.[13]

Conversion between PS/2 and USB

Many keyboards and mice were specifically designed to support both the USB and the PS/2 interfaces and protocols, selecting the appropriate connection type at power-on. Such devices are generally equipped with a USB connector and ship with a passive wiring adapter to allow connection to a PS/2 port. Such passive adapters are not standardized and may therefore be specific to the device they came with. Connecting them to a PS/2 port would require a protocol converter, actively translating between the protocols. Such adapters only support certain classes of USB devices such as keyboards and mice, but are not model- or vendor-specific.

Older PS/2-only peripherals can be connected to a USB port via an active converter, which generally provides a pair of PS/2 ports (which may be designated as one keyboard and one mouse, even though both ports may support both protocols) at the cost of one USB port on the host computer.[14]

Color code

Is an interface between a computer and a printer that enables the computer to transfer multiple bits of information to the printer simultaneously?

Keyboard with non-standard colored PS/2 connector (orange)

Color Description
  Purple Keyboard
  Green Mouse

Original PS/2 connectors were black or had the same color as the connecting cable (mainly white). Later the PC 97 standard introduced a color code: the keyboard port, and the plugs on compliant keyboards, were purple; mouse ports and plugs were green. (Some vendors initially used a different color code; Logitech used the color orange for the keyboard connector for a short period, but soon switched to purple.) Today this code is still used on most PCs. The pinouts of the connectors are the same, but most computers will not recognize devices connected to the wrong port.

Hardware issues

Hotplugging

PS/2 ports are designed to connect the digital I/O lines of the microcontroller in the external device directly to the digital lines of the microcontroller on the motherboard. They are not designed to be hot swappable. Hot swapping PS/2 devices usually does not cause damage because more modern microcontrollers tend to have more robust I/O lines built into them which are harder to damage than those of older controllers;[15] however, hot swapping can still potentially cause damage on older machines, or machines with less robust port implementations.

If they are hot swapped, the devices must be similar enough that the driver running on the host system recognizes and can be used with the new device. Otherwise, the new device will not function properly. While this is seldom an issue with standard keyboard devices, the host system rarely recognizes the new device attached to the PS/2 mouse port. In practice most keyboards can be hot swapped but this should be avoided.

Durability

Is an interface between a computer and a printer that enables the computer to transfer multiple bits of information to the printer simultaneously?

Bus powered PS/2-to-USB adapter

PS/2 connectors are not designed to be plugged in and out very often, which can lead to bent or broken pins. Additionally, PS/2 connectors only insert in one direction and must be rotated correctly before attempting connection. (If a user attempts to insert the connector in the wrong orientation and then tries to rotate it to the correct orientation without first pulling it out, then bent pins could result.)

Most but not all connectors include an arrow or flat section which is usually aligned to the right or top of the jack before being plugged in. The exact direction may vary on older or non-ATX computers and care should be taken to avoid damaged or bent pins when connecting devices. This issue is slightly alleviated in modern times with the advent of the PS/2-to-USB adapter: users can just leave a PS/2 connector plugged into the PS/2-to-USB adapter at all times and not risk damaging the pins this way. A USB-to-PS/2 adapter does not have this problem.

Fault isolation

In a standard implementation both PS/2 ports are usually controlled by a single microcontroller on the motherboard. This makes design and manufacturing extremely simple and cheap. However, a rare side effect of this design is that a malfunctioning device can cause the controller to become confused, resulting in both devices acting erratically. (A well designed and programmed controller will not behave in this way.) The resulting problems can be difficult to troubleshoot (e.g., a bad mouse can cause problems that appear to be the fault of the keyboard and vice versa).

See also

  • BIOS interrupt call
  • DIN connector on IBM PC keyboards
  • Bus mouse
  • Connections on mice
  • DE-9 connector
  • USB

References

  1. ^ There is actually no technical reason that either port could not work with either type of device, if appropriate software was written to support that arrangement.
  2. ^ a b "The PS/2 Mouse Interface". 1 April 2003. Archived from the original on 16 September 2008.
  3. ^ Compare the logic diagrams in the IBM Personal Computer Technical Reference manual with those in the IBM Personal Computer AT Technical Reference manual.
  4. ^ IBM Personal Computer Technical Reference, IBM Personal Computer AT Technical Reference
  5. ^ IBM Personal Computer AT Technical Reference
  6. ^ "PS/2 Keyboard (IBM Thinkpad) Y adapter". RU: Pinouts. Retrieved 14 June 2011.
  7. ^ Lenerz, Gerhard (7 November 2006). "Common Input Devices". Hardware. SGIstuff. Archived from the original on 26 June 2007. Retrieved 14 March 2007.
  8. ^ "Power Computing PowerBase". Low end Mac. Retrieved 4 April 2011.
  9. ^ "Massive, undetectable security flaw found in USB: It's time to get your PS/2 keyboard out of the cupboard". ExtremeTech. Retrieved 26 October 2015.
  10. ^ a b "Mouse Optimization Guide: Acceleration Fix and Polling Rate".
  11. ^ "Computer Labs 2012/2013 - 1st Semester Lab 5: The PS/2 Mouse".
  12. ^ "Device Class Definition for HID 1.11" (PDF). Archived from the original (PDF) on 11 August 2014.
  13. ^ "N-key Rollover via PS/2 and USB". Geek hack. Archived from the original on 25 December 2010.
  14. ^ "The pros and cons of PS-2 to USB adapters and converters". TechTarget.
  15. ^ Adam Chapweske (5 September 2003). "The PS/2 Mouse/Keyboard Protocol". Archived from the original on 16 November 2016. Retrieved 26 November 2016.

Is an interface between a computer and a printer that enables the computer to transfer multiple bits of information to the printer simultaneously?

  • "Keyboard and Auxiliary Device Controller" (PDF). Hardware Interface Technical Reference -Common Technical-. IBM. October 1990.
  • PS/2 keyboard and mouse mini-DIN 6 connector pinouts, Burton sys.
  • PS/2 In-depth information, Computer engineering, archived from the original on 1 September 2006, retrieved 11 September 2006.
  • Technical information on Interfacing with the AT keyboard, Beyond logic, archived from the original on 30 August 2018, retrieved 25 March 2012.

Retrieved from "https://en.wikipedia.org/w/index.php?title=PS/2_port&oldid=1113010489"