A PC-compatible computer system’s keyboard and mouse can be connected using the 6-pin mini-DIN PS/2 port. It was first presented in 1987 and takes its name from the IBM Personal System/2 line of personal computers. The bigger 5-pin/180° DIN connector used in the IBM PC/AT design was replaced by the smaller PS/2 keyboard connector, while the PS/2 mouse connector mostly replaced the older DE-9 RS-232 “serial mouse” connector. Only the type of electrical connector is different between the IBM AT keyboard port and the PS/2 keyboard port in terms of logic and electrical compatibility.
The keyboard and mouse interfaces of the PS/2 platform are electrically similar and use the same communication protocol. The PS/2 platform included a second port with the same design as the keyboard port for usage with a mouse. The keyboard and mouse ports on a given system, in contrast to Apple’s otherwise comparable Apple Desktop Bus connector, might not be interchangeable because the two devices use different sets of commands and because device drivers are typically hard-coded to communicate with each device at the address of the port that is typically assigned to that device. (Mouse drivers are written to use the second port, whereas keyboard drivers are written to use the first port.)
A bidirectional synchronous serial channel is implemented on each port. The channel has a little amount of asymmetry, favouring transmission from the input device to the computer, which is the most common scenario. The unidirectional IBM PC keyboard interface was developed into the bidirectional IBM AT and PS/2 keyboard interface, which uses the same signal lines but adds the ability to transfer data from the computer back to the keyboard, which accounts for the asymmetry.
Data and clock are the interface’s two primary signal lines. These signals are single-ended and are individually operated by an open-collector driver. The transmission typically occurs from the gadget to the host. The device merely toggles the Clock line once for each bit to output a serial frame of data (consisting of 8 bits of data and a parity bit) on the Data line serially. By pulling the clock line low, the host can alter the direction of communication and stop the linked device from communicating.
When the device is transmitting, the host can stop it by pulling the clock low. The device can detect this by holding the clock low when the device releases it, causing the clock to go high when the device-generated clock signal toggles. The device must instantly stop transmitting and release the clock and data to both float high when the host pulls the clock low. The host can simply prevent the device from broadcasting while it is not yet time to receive by taking advantage of this interface state.
Keyboards made for one can be connected to the other with a straightforward wiring adaptor since the PS/2 keyboard interface is electrically identical to the 5-pin DIN connector on previous AT keyboards. Such wire adapters and adapter cables used to be widely sold. Although an IBM PC or PC XT keyboard can be attached to the PS/2 port using a wiring adapter designed for an AT keyboard, the earlier keyboard will not function with the PS/2 port due to the fact that they use a distinct unidirectional protocol using the same DIN connection as AT keyboards.
Contrarily, the RS-232 mouse interface, which was typically used for mice on PCs without PS/2 ports, is very different from the PS/2 mouse interface. Nevertheless, many mice were made that could work with both with a straightforward passive wiring adapter; the mice would detect the adapter’s presence based on its wiring and then switch protocols accordingly.
Pins in PS/2 connections can bend or break because they are not intended to be plugged in and out often. In addition, PS/2 connectors can only be inserted in one direction and must be correctly rotated before connection is attempted.
Most connectors, but not all, have an arrow or flat part that must be positioned with respect to the jack’s right or top before it may be plugged in. On older or non-ATX computers, the precise direction may vary, therefore when connecting devices, care should be taken to prevent twisted or damaged pins. With the invention of the PS/2-to-USB converter, this problem is somewhat mitigated in recent times. Users may simply leave a PS/2 connection hooked into the adapter all the time without worrying about harming the pins. This issue is not present with a USB-to-PS/2 adaptor.