Changeset 39e523d in avrstuff


Ignore:
Timestamp:
Jul 24, 2014, 1:12:42 PM (10 years ago)
Author:
Adrien Destugues <pulkomandy@…>
Branches:
main
Children:
b83dc2a
Parents:
c2c5ac9
Message:

Update docs now that I have things working.

git-svn-id: svn://pulkomandy.tk/avrstuff@102 c6672c3c-f6b6-47f9-9001-1fd6b12fecbe

Location:
kbd/xtk/doc
Files:
1 added
1 edited

Legend:

Unmodified
Added
Removed
  • kbd/xtk/doc/signalling.txt

    rc2c5ac9 r39e523d  
    55serial link.
    66
    7 When the link is idle, the CLK line is high (floating), and the DATA line is
    8 low (pulled by the keyboard).
     7Both the data and clock line are open collector. When the system is idle, both
     8are floating high. It is unclear wether it's up to the keyboard or PC to have
     9pull-up resistors, but it is safe to have both.
    910
    1011When the keyboard wants to send a byte:
    11 - It checks that the CLK line is not pulled low (the PC/XT does this when the
    12 receiving buffer is full).
     12- It waits for the CLK and DAT lines to be high, meaning the PC is ready to
     13receive a byte.
    1314- It sends the byte for the keycode. There is a start bit (DATA=1), followed by
    1415the 7-bit keycode (LSb first), and the make/break bit (set for release, clear
     
    1819read the received byte and cleared the receiving register.
    1920
     21Timing is not critical as this is handled on the PC side using a shift register.
     22The only limitation is that the clock signal is gated with the CPU clock, and
     23should not go faster than 2.3MHz.
     24
    2025The 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).
     26keyboard by pulling the clock line low for too long (10ms or more). At boot and
     27upon reset, the keyboard is supposed to send 0xAA when it is ready to work.
     28However, I'm not sure my XT clone BIOS actually checks for that.
    2329
    2430It is up to the keyboard to manage the states of the LEDs. At power on, the LEDs
     
    2733the keyboard to handle typematic (key repeat) and a keyboard buffer, if needed.
    2834
    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.
     35The scancodes are the same as PS/2 keyboards scan code set 1. Unfortunately, a
     36lot of keyboards won't support this properly, so we use the default scan code
     37set 2 (used by Windows, so it should work everywhere) and translate it back
     38using a lookup table.
Note: See TracChangeset for help on using the changeset viewer.