1 PS/2 to USB keyboard converter
2 ==============================
3 This firmware converts PS/2 keyboard protocol to USB.(It supports Scan Code Set 2.)
8 1. Connect **Vcc** and **GND**.
9 2. Connect **Clock** and **Data** line.
10 - **Interrupt**: **Clock** is on `PD1` and **Data** on `PD0`.(Recommended. Soarer's converter compatible)
11 - **Busywait**: **Clock** is on `PD1` and **Data** on `PD0`.
12 - **USART**: **Clock** is on `PD5` and **Data** on `PD2`.
13 3. You need pull-up resistors. 1K-10K Ohm would be fine.
15 To change pin configuration edit **config.h** and **Makefile**.
20 For **TMK converter Rev.2**:
22 $ make -f Makefile.rev2 clean
23 $ make -f Makefile.rev2 KEYMAP=plain
25 To program firmware push the button on converter and run:
27 $ make -f Makefile.rev2 KEYMAP=plain dfu
30 - For **TMK converter Rev.1** use `make -f Makefile.rev1` instead.
31 - To select keymap use `jis`, `spacefn` or your own in place of `plain`.
36 Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap create file named `keymap_<name>.c` and see keymap document(you can find in README.md of top directory) and existent keymap files.
39 PS/2 signal handling implementations
40 ------------------------------------
41 Following three methods can be used to implement PS/2 signal handling.
43 ### Simple and stupid busy-wait(ps2_busywait.c)
44 This is expected to implemented with portable C code for reference.
45 ### Interrupt driven(ps2_interrupt.c)
46 Uses pin interrupt to detect falling edge of clock line.
47 ### USART hardware module(ps2_usart.c)
48 Uses AVR USART engine to receive PS/2 signal.
50 To select method edit Makefile.
55 With V-USB you can use this converter on ATmega(168/328) but it doesn't support NKRO at this time.
59 +---+ +---------------+
60 USB GND | | ATmega168 |
62 5V <-------+--------+---|Vcc,AVCC | PS/2
64 D- <----+--+-----R2-----|INT1 RXD|------->DATA
65 D+ <----|---+----R3-----|INT0 XCK|------->CLOCK
67 GND<----+---+--+--+-----|GND | ->GND
78 X1: Crystal 20MHz(16MHz/12MHz)