What Is a PS/2 Connector?
The PS / 2 interface is an interface on a PC-compatible computer system that can be used to link a keyboard and mouse. PS / 2 is named after the personal computer introduced by IBM in 1987: PS / 2 series. PS / 2 mouse connection is usually used to replace the old serial mouse interface (DB-9 RS-232); PS / 2 keyboard connection is used to replace the large 5-pin DIN interface designed for IBM PC / AT. The keyboard and mouse interfaces of the PS / 2 are very similar in electrical characteristics. The main difference is that the keyboard interface requires two-way communication. In the early days, if the keyboard and mouse slots were swapped, most desktop motherboards would not recognize the keyboard and mouse. It doesn't matter now.
PS / 2 interface
- The PS / 2 interface is an interface on a PC-compatible computer system that can be used to link
- With the development of the computer industry, the keyboard, which is the most commonly used input device for computers, is also changing with each passing day. In 1981, IBM introduced the IBM PC / XT keyboard and its interface standard. The standard defines 83 keys, uses a 5-pin DIN connector and a simple serial protocol. Actually, the first set
- PS / 2 equipment is mainly used to generate synchronous clock signals and read and write data.
PS / 2 interface sends bytes
- Sending a byte from PS / 2 to a PC can be done as follows: [1]
- (1) Detect the level of the clock line, if the clock line is low, the delay is 50 s;
- (2) Detecting whether the clock signal is high, if it is high, it will execute downward, and if it is low, it will go to (1);
- (3) Check whether the data line is high, if it is high, continue to execute, if it is low, then abort the transmission (at this time, the PC is sending data to the PS / 2 device, so the PS / 2 device must be transferred to the receiving program to receive data);
- (4) Delay 20s (if the start bit is being transmitted at this time, it should be delayed 40s);
- (5) Output the start bit (0) to the data line. It should be noted here that the clock line is checked after each bit is sent to ensure that the PC does not suppress the PS / 2 device, and if there is, the transmission is aborted;
- (6) Output 8 data bits to the data line;
- (7) Output check digit;
- (8) Output stop bit (1);
- (9) Delay 30s (if the clock signal is released when the stop bit is sent, it should be delayed 50s);
- The following steps can be used to send a single bit:
- (1) Prepare the data bits (put the data bits to be sent on the data line);
- (2) 20s delay;
- (3) Pull the clock line low;
- (4) Delay time 40s;
- (5) release the clock line;
- (6) Delay time is 20s.
PS / 2 interface receives bytes
- Because the PS / 2 device can provide a serial synchronous clock, if the PC sends data, the PC must first set the clock line and data line to the state of requesting transmission. The PC suppresses communication by pulling down the clock line greater than 100 s, and sends a signal requesting data to be sent through the pull down data line, and then releases the clock. When the PS / 2 device detects the data it needs to receive, it generates a clock signal and records the next 8 data bits and a stop bit. The host then prepares data to the data line when the clock line goes low, and latches the data on the rising edge of the clock. The PS / 2 equipment must be compatible with a PC to read accurate data. The specific connection steps are as follows: [1]
- (1) Wait for the clock line to be high.
- (2) Determine if the data line is low, if it is high, exit by mistake, otherwise continue execution.
- (3) Read the data content on the address line. There are 8 bits in total. After each bit is read, it should be checked whether the clock line is pulled low by the PC. If it is pulled low, the reception should be aborted.
- (4) Read the content of the parity bit on the address line, 1 bit.
- (5) Read the stop bit.
- (6) If the data line is 0 (that is, low level), the PS / 2 device continues to generate clocks until it receives a 1 and generates an error signal (because the stop bit is 1, if the PS / 2 device does not read to stop Bit, this indicates an error in this transmission).
- (7) Output the response bit.
- (8) Check the parity bit. If the check fails, an error signal is generated to indicate that an error occurred in the transmission.
- (9) Delay 45 s, so that the PC can perform the next transmission.
- The steps to read the data line are as follows:
- (1) Delay time 20s;
- (2) Pull the clock line low;
- (3) Delay time 40s;
- (4) release the clock line;
- (5) 20s delay;
- (6) Read the data line.
- The following steps can be used to issue an acknowledge bit;
- (1) 15s delay;
- (2) Pull the data line low;
- (3) Delay 5s;
- (4) Pull the clock line low;
- (5) Delay time 40s;
- (6) release the clock line;
- (7) Delay 5s;
- (8) Release the data cable.