Presentation is loading. Please wait.

Presentation is loading. Please wait.

EE 316 Computer Engineering Junior Lab PS/2 Keyboard.

Similar presentations


Presentation on theme: "EE 316 Computer Engineering Junior Lab PS/2 Keyboard."— Presentation transcript:

1 EE 316 Computer Engineering Junior Lab PS/2 Keyboard

2 The PS/2 Keyboard PS/2 device interface was developed by IBM. PS/2 port these days use the 6-pin mini-DIN connectors. The Data and clock are open-collector with pull-up resistors. http://www.computer-engineering.org/ps2protocol/

3 PS/2 Keyboard, contd..  PS/2 devices use bidirectional synchronous serial protocol.  The device (keyboard in this case) generates the clock.  The clock frequency is 10-16.7 kHz.  One byte of data is sent at a time.  Each frame from keypad to the PC contains 11 bits. These bits are: http://www.computer-engineering.org/ps2protocol/ 1 start bit. This is always 0. 8 data bits, least significant bit first. 1 Parity bit. 1 stop bit. This is always 1.

4 Scan code Keyboards consist of a large matrix of keys The keys are monitored or scanned by an on-board processor (aka the "keyboard encoder“). If a key is pressed, held and released, the keypad sends out an 11-bit “Scan code” (data). There are several scan codes. We will use the default code (See Scan code 2) for all modern keyboard.(See Scan code 2) http://www.computer-engineering.org/ps2keyboard/

5 Keyboard to Host communication The “Make scan code” for Q http://www.computer-engineering.org/ps2protocol/ Stop bit = 1 0 1 0 1 0 1 0 0 0 0 0001 0101 = 0X15 <= The make scan code for the “Q” key Start bit = 0 Parity bit Keypad data is read on the Falling edge of the clock

6 References http://www.computer- engineering.org/ps2protocol/ http://www.computer- engineering.org/ps2protocol/ http://www.computer- engineering.org/ps2keyboard/ http://www.computer- engineering.org/ps2keyboard/ http://www.computer- engineering.org/ps2keyboard/scancodes2.html http://www.computer- engineering.org/ps2keyboard/scancodes2.html


Download ppt "EE 316 Computer Engineering Junior Lab PS/2 Keyboard."

Similar presentations


Ads by Google