PS/2 port
Six-pin mini-DIN connector for keyboards and mice on PCs.
The PS/2 port is a six-pin mini-DIN connector designed to attach a keyboard or mouse to a PC-compatible system. It takes its name from the IBM Personal System/2 line of computers, which debuted the connector in 1987. The PS/2 mouse connection largely replaced the older DE-9 RS-232 serial mouse connector, while the PS/2 keyboard connection took over from the larger five-pin/180° DIN connector used in the IBM PC/AT.
Electrically and logically, the PS/2 keyboard port is identical to the IBM AT keyboard port; only the physical connector differs. The PS/2 platform added a second port of the same design for a mouse, so both interfaces share the same electrical characteristics and communication protocol. However, unlike the similar Apple Desktop Bus connector, a system’s keyboard and mouse ports are not usually interchangeable. This is because the two devices use different command sets, and device drivers are typically hard-coded to communicate with each device at the port address conventionally assigned to it—keyboard drivers use the first port, and mouse drivers use the second.
Each port operates as a bidirectional synchronous serial channel, but the channel is slightly asymmetrical, favoring transmission from the input device to the computer, which is the more common direction. This bidirectional interface evolved from the unidirectional IBM PC keyboard interface, reusing the same signal lines but adding the ability to send data back to the keyboard from the host, which explains the asymmetry.
The interface uses two main signal lines: Data and Clock. Both are single-ended signals driven by open-collector drivers. Normally, data flows from the device to the host. To send a byte, the device outputs a serial frame (eight data bits plus a parity bit) on the Data line, toggling the Clock line once per bit. The host controls communication direction via the Clock line: pulling it low inhibits the device from transmitting. If the host pulls Clock low while the device is transmitting, the device must stop immediately and release both Clock and Data to float high. This state can simply be used to prevent the device from sending when the host is not ready.
- Introduced
- 1987
- Introduced with
- IBM Personal System/2 series
- Connector type
- six-pin mini-DIN
- Signal lines
- Data and Clock
- Default mouse poll rate
- 100 Hz
- Default usb mouse poll rate
- 125 Hz
- Maximum ps/2 mouse sampling rate
- 200 Hz
Lore & Background
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 for connecting a mouse; thus the PS/2-style keyboard and mouse interfaces are electrically similar and employ the same communication protocol. However, unlike the Apple Desktop Bus connector, a given system's keyboard and mouse port may not be interchangeable because the two devices use different sets of commands and device drivers are generally hard-coded to communicate with each device at the address of the port conventionally assigned to that device.
Each port implements a bidirectional synchronous serial channel that favors transmission from the input device to the computer. The interface has two main signal lines, Data and Clock, driven by open-collector drivers. Normally, the device transmits to the host by outputting a serial frame of data on the Data line while toggling the Clock line. The host can inhibit transmission by pulling Clock low. To send data to the device, the host pulls Clock low, then Data low, releases Clock, and outputs a frame of bits on the Data line. The device then pulls Data low for one clock period to indicate successful reception. Transmission from device to host is favored because the device can begin transmitting immediately from idle, while the host must seize the channel by pulling Clock and Data low.
Reader's Guide
PS/2 is now considered a legacy port, with USB ports normally preferred for connecting keyboards and mice, dating back at least as far as the Intel/Microsoft PC 2001 specification of 2000. However, as of 2023, PS/2 ports continue to be included on some computer motherboards and are favored by some users for several reasons. PS/2 ports may be favored in high-security environments because they allow USB ports to be totally disabled, preventing connection of USB removable storage devices and malicious USB devices. The PS/2 interface provides no restriction on key rollover, whereas USB boot keyboards are limited to six-key rollover. PS/2 ports free USB ports for other uses, and some USB keyboards may not operate the BIOS on certain motherboards due to driver issues, while PS/2 has near-universal BIOS compatibility. The simplicity of PS/2 makes it useful for embedded systems and retro computers that may lack USB host peripherals. USB mice send data more quickly than PS/2 mice because standard USB mice are polled at 125 Hz while standard PS/2 mice send interrupts at 100 Hz, though PS/2 supports a sampling rate up to 200 Hz.
Did You Know?
- The PS/2 port was introduced with the IBM Personal System/2 series in 1987.
- PS/2 mouse and keyboard connectors have been used in non-IBM PC-compatible systems such as the DEC AlphaStation and SGI Indy.
More in Computer Keyboards 1-24
Spotted an error? Know more?
Reader corrections go straight into our review queue. Suggest an edit · How this site is sourced
