Changeset 39e523d in avrstuff
- Timestamp:
- Jul 24, 2014, 1:12:42 PM (10 years ago)
- Branches:
- main
- Children:
- b83dc2a
- Parents:
- c2c5ac9
- Location:
- kbd/xtk/doc
- Files:
-
- 1 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kbd/xtk/doc/signalling.txt
rc2c5ac9 r39e523d 5 5 serial link. 6 6 7 When the link is idle, the CLK line is high (floating), and the DATA line is 8 low (pulled by the keyboard). 7 Both the data and clock line are open collector. When the system is idle, both 8 are floating high. It is unclear wether it's up to the keyboard or PC to have 9 pull-up resistors, but it is safe to have both. 9 10 10 11 When the keyboard wants to send a byte: 11 - It checks that the CLK line is not pulled low (the PC/XT does this when the12 receiv ing buffer is full).12 - It waits for the CLK and DAT lines to be high, meaning the PC is ready to 13 receive a byte. 13 14 - It sends the byte for the keycode. There is a start bit (DATA=1), followed by 14 15 the 7-bit keycode (LSb first), and the make/break bit (set for release, clear … … 18 19 read the received byte and cleared the receiving register. 19 20 21 Timing is not critical as this is handled on the PC side using a shift register. 22 The only limitation is that the clock signal is gated with the CPU clock, and 23 should not go faster than 2.3MHz. 24 20 25 The PC stores the data on the falling edge of the clock. It can also reset the 21 keyboard by pulling the clock line low for too long (unsure what the exact 22 timing is). 26 keyboard by pulling the clock line low for too long (10ms or more). At boot and 27 upon reset, the keyboard is supposed to send 0xAA when it is ready to work. 28 However, I'm not sure my XT clone BIOS actually checks for that. 23 29 24 30 It is up to the keyboard to manage the states of the LEDs. At power on, the LEDs … … 27 33 the keyboard to handle typematic (key repeat) and a keyboard buffer, if needed. 28 34 29 At boot, the keyboard is supposed to send 0xAA when it is ready to work. 30 However, I'm not sure my XT clone BIOS actually checks for that. 35 The scancodes are the same as PS/2 keyboards scan code set 1. Unfortunately, a 36 lot of keyboards won't support this properly, so we use the default scan code 37 set 2 (used by Windows, so it should work everywhere) and translate it back 38 using a lookup table.
Note:
See TracChangeset
for help on using the changeset viewer.