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 In case of Teensy2.0(ATMega32U4):
10 1. Connect **Vcc** and **GND**.
11 2. Connect **Clock** and **Data** line.
12 - **Interrupt**: **Clock** is on `PD1` and **Data** on `PD0`.(Recommended. Soarer's converter compatible)
13 - **Busywait**: **Clock** is on `PD1` and **Data** on `PD0`.
14 - **USART**: **Clock** is on `PD5` and **Data** on `PD2`.
15 3. Optionally you need pull-up resistor. 1K-10K Ohm is OK.
17 To change pin configuration edit config.h.
22 For **PJRC Teensy** just run `make`:
30 $ make KEYMAP=[plain|jis|spacefn|...]
32 After that you will find HEX file `ps2_usb_lufa.hex` in current directory.
35 - For **TMK converter Rev.1** use `make -f Makefile.tmk_rev1` instead of `make` and HEX file is `ps2_usb_tmk_rev1.hex`.
37 - For **TMK converter Rev.2** use `make -f Makefile.tmk_rev2` instead of `make` and HEX file is `ps2_usb_tmk_rev2.hex`.
42 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.
45 PS/2 signal handling implementations
46 ------------------------------------
47 Following three methods can be used to implement PS/2 signal handling.
49 ### Simple and stupid busy-wait(ps2_busywait.c)
50 This is expected to implemented with portable C code for reference.
51 ### Interrupt driven(ps2_interrupt.c)
52 Uses pin interrupt to detect falling edge of clock line.
53 ### USART hardware module(ps2_usart.c)
54 Uses AVR USART engine to receive PS/2 signal.
56 To select method edit Makefile.
61 You can also use this converter on ATmega(168/328) with V-USB instead of Teensy.
62 The converter on V-USB lacks some features for now: USB NKRO and System/Media control.
66 +---+ +---------------+
67 USB GND | | ATmega168 |
69 5V <-------+--------+---|Vcc,AVCC | PS/2
71 D- <----+--+-----R2-----|INT1 RXD|------->DATA
72 D+ <----|---+----R3-----|INT0 XCK|------->CLOCK
74 GND<----+---+--+--+-----|GND | ->GND
85 X1: Crystal 20MHz(16MHz/12MHz)