AT Keyboard/Mouse protocol
From HwB
(Difference between revisions)
(6 intermediate revisions by one user not shown) | |||
Line 19: | Line 19: | ||
| 11 || Stopp bit || Always 1 | | 11 || Stopp bit || Always 1 | ||
|} | |} | ||
+ | |||
+ | == Device to host == | ||
+ | [[Image:PCKeyboardMouse_1.svg]] | ||
+ | |||
+ | == Host to device == | ||
+ | [[Image:PCKeyboardMouse_2.svg]] | ||
+ | |||
+ | == Voltage levels == | ||
+ | {| {{border}} | ||
+ | ! !! Min !! Max | ||
+ | |- | ||
+ | | Low (0) || 0.0 V || 0.7 V | ||
+ | |- | ||
+ | | High (1) || 2.4 V || 5.25 V | ||
+ | |} | ||
+ | |||
+ | == Host to Keyboard commands == | ||
+ | |||
+ | {| {{border}} | ||
+ | ! Byte !! Command !! Additional Data | ||
+ | |- | ||
+ | | 0xED || Set Status Indicators || LED bitmask | ||
+ | |- | ||
+ | | 0xEE || Echo || | ||
+ | |- | ||
+ | | 0xEF || Invalid Command || | ||
+ | |- | ||
+ | | 0xF0 || Select Alternate Scan Codes || Scan code set | ||
+ | |- | ||
+ | | 0xF1 || Invalid Command || | ||
+ | |- | ||
+ | | 0xF2 || Read ID || | ||
+ | |- | ||
+ | | 0xF3 || Set Typematic Rate/Delay || Encoded rate/delay | ||
+ | |- | ||
+ | | 0xF4 || Enable || | ||
+ | |- | ||
+ | | 0xF5 || Default Disable || | ||
+ | |- | ||
+ | | 0xF6 || Set Default || | ||
+ | |- | ||
+ | | 0xF7 || Set All Keys - Typematic || | ||
+ | |- | ||
+ | | 0xF8 || Set All Keys - Make/Break || | ||
+ | |- | ||
+ | | 0xF8 || Set All Keys - Make || | ||
+ | |- | ||
+ | | 0xFA || Set All Keys - Typematic/Make/Break || | ||
+ | |- | ||
+ | | 0xFB || Set All Key Type - Typematic || Scan code | ||
+ | |- | ||
+ | | 0xFC || Set All Key Type - Make/Break || Scan code | ||
+ | |- | ||
+ | | 0xFD || Set All Key Type - Make || Scan code | ||
+ | |- | ||
+ | | 0xFE || Resend || | ||
+ | |- | ||
+ | | 0xFF || Reset || | ||
+ | |} | ||
+ | |||
+ | {| {{border}} | ||
+ | ! Bit !! Typematic (Characters per second, ±20%) | ||
+ | |- | ||
+ | | 00000 || 30.0 | ||
+ | |- | ||
+ | | 00001 || 26.7 | ||
+ | |- | ||
+ | | 00010 || 24.0 | ||
+ | |- | ||
+ | | 00011 || 21.8 | ||
+ | |- | ||
+ | | 00100 || 20.0 | ||
+ | |- | ||
+ | | 00101 || 18.5 | ||
+ | |- | ||
+ | | 00110 || 17.1 | ||
+ | |- | ||
+ | | 00111 || 16.0 | ||
+ | |- | ||
+ | | 01000 || 15.0 | ||
+ | |- | ||
+ | | 01001 || 13.3 | ||
+ | |- | ||
+ | | 01010 || 12.0 | ||
+ | |- | ||
+ | | 01011 || 10.9 | ||
+ | |- | ||
+ | | 01100 || 10.0 | ||
+ | |- | ||
+ | | 01101 || 9.2 | ||
+ | |- | ||
+ | | 01110 || 8.0 | ||
+ | |- | ||
+ | | 01111 || 8.0 | ||
+ | |- | ||
+ | | 10000 || 7.5 | ||
+ | |- | ||
+ | | 10001 || 6.7 | ||
+ | |- | ||
+ | | 10010 || 6.0 | ||
+ | |- | ||
+ | | 10011 || 5.5 | ||
+ | |- | ||
+ | | 10100 || 5.0 | ||
+ | |- | ||
+ | | 10101 || 4.6 | ||
+ | |- | ||
+ | | 10110 || 4.3 | ||
+ | |- | ||
+ | | 10111 || 4.0 | ||
+ | |- | ||
+ | | 11000 || 3.7 | ||
+ | |- | ||
+ | | 11001 || 3.3 | ||
+ | |- | ||
+ | | 11010 || 3.0 | ||
+ | |- | ||
+ | | 11011 || 2.7 | ||
+ | |- | ||
+ | | 11100 || 2.5 | ||
+ | |- | ||
+ | | 11101 || 2.3 | ||
+ | |- | ||
+ | | 11110 || 2.1 | ||
+ | |- | ||
+ | | 11111 || 2.0 | ||
+ | |} | ||
+ | |||
+ | * Typematic rate: 10.9 characters per second (±20%) | ||
+ | * Delay: 500 milliseconds (±20%) | ||
+ | |||
+ | == Keyboard to Host commands == | ||
+ | |||
+ | {| {{border}} | ||
+ | ! Byte !! Command | ||
+ | |- | ||
+ | | 0x00 || Key Detection Error/Overrun (Code Sets 2 and 3) | ||
+ | |- | ||
+ | | 0x83 0xAB || Keyboard ID | ||
+ | |- | ||
+ | | 0xAA || BAT Completion Code | ||
+ | |- | ||
+ | | 0xFC || BAT Failure Code | ||
+ | |- | ||
+ | | 0xEE || Echo | ||
+ | |- | ||
+ | | 0xF0 || Break (key-up) | ||
+ | |- | ||
+ | | 0xFA || Acknowledge (ACK) | ||
+ | |- | ||
+ | | 0xFE || Resend | ||
+ | |- | ||
+ | | 0xFF || Key Detection Error/Overrun (Code Set 1) | ||
+ | |} | ||
+ | |||
+ | == Contributors == | ||
+ | * [[User:Joakim|Joakim Ögren]] | ||
+ | |||
+ | == Links == | ||
+ | * [http://techpubs.sgi.com/library/tpl/cgi-bin/getdoc.cgi?coll=0650&db=man&fname=/usr/share/catman/a_man/cat7/pckeyboard.z SGI Techpubs Library: IRIX 6.5 pckeyboard(7)] | ||
+ | * [http://www.electronic-engineering.ch/microchip/datasheets/kbd_spec.pdf Cherry keyboard G83-6000: Technical Specification] | ||
+ | |||
+ | == Sources == | ||
+ | * [http://www.networktechinc.com/ps2-prots.html NTI: PS/2 Keyboard & Mouse protocols] | ||
[[Category:Information]] | [[Category:Information]] |
Latest revision as of 06:49, 11 July 2007
Protocol used for:
Details:
- Protocol is bi-directional
- Clock frequency is 10-16.7 kHz
Bit | Description | Comment |
---|---|---|
1 | Start bit | Always 0 |
2-9 | 8 Data bits | LSB first |
10 | Parity bit | Odd parity |
11 | Stopp bit | Always 1 |
Contents |
Device to host
Host to device
Voltage levels
Min | Max | |
---|---|---|
Low (0) | 0.0 V | 0.7 V |
High (1) | 2.4 V | 5.25 V |
Host to Keyboard commands
Byte | Command | Additional Data |
---|---|---|
0xED | Set Status Indicators | LED bitmask |
0xEE | Echo | |
0xEF | Invalid Command | |
0xF0 | Select Alternate Scan Codes | Scan code set |
0xF1 | Invalid Command | |
0xF2 | Read ID | |
0xF3 | Set Typematic Rate/Delay | Encoded rate/delay |
0xF4 | Enable | |
0xF5 | Default Disable | |
0xF6 | Set Default | |
0xF7 | Set All Keys - Typematic | |
0xF8 | Set All Keys - Make/Break | |
0xF8 | Set All Keys - Make | |
0xFA | Set All Keys - Typematic/Make/Break | |
0xFB | Set All Key Type - Typematic | Scan code |
0xFC | Set All Key Type - Make/Break | Scan code |
0xFD | Set All Key Type - Make | Scan code |
0xFE | Resend | |
0xFF | Reset |
Bit | Typematic (Characters per second, ±20%) |
---|---|
00000 | 30.0 |
00001 | 26.7 |
00010 | 24.0 |
00011 | 21.8 |
00100 | 20.0 |
00101 | 18.5 |
00110 | 17.1 |
00111 | 16.0 |
01000 | 15.0 |
01001 | 13.3 |
01010 | 12.0 |
01011 | 10.9 |
01100 | 10.0 |
01101 | 9.2 |
01110 | 8.0 |
01111 | 8.0 |
10000 | 7.5 |
10001 | 6.7 |
10010 | 6.0 |
10011 | 5.5 |
10100 | 5.0 |
10101 | 4.6 |
10110 | 4.3 |
10111 | 4.0 |
11000 | 3.7 |
11001 | 3.3 |
11010 | 3.0 |
11011 | 2.7 |
11100 | 2.5 |
11101 | 2.3 |
11110 | 2.1 |
11111 | 2.0 |
- Typematic rate: 10.9 characters per second (±20%)
- Delay: 500 milliseconds (±20%)
Keyboard to Host commands
Byte | Command |
---|---|
0x00 | Key Detection Error/Overrun (Code Sets 2 and 3) |
0x83 0xAB | Keyboard ID |
0xAA | BAT Completion Code |
0xFC | BAT Failure Code |
0xEE | Echo |
0xF0 | Break (key-up) |
0xFA | Acknowledge (ACK) |
0xFE | Resend |
0xFF | Key Detection Error/Overrun (Code Set 1) |