]> git.gir.st - tmk_keyboard.git/blob - converter/ps2_usb/README.md
Merge branch 'master' of https://github.com/nemith/tmk_keyboard into nemith-master
[tmk_keyboard.git] / converter / ps2_usb / README.md
1 PS/2 to USB keyboard converter
2 ==============================
3 This firmware converts PS/2 keyboard protocol to USB.(It supports Scan Code Set 2.)
4
5
6 Connect Wires
7 -------------
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.
14
15 To change pin configuration edit **config.h** and **Makefile**.
16
17
18 Build Firmware
19 --------------
20 For **TMK converter Rev.2**:
21
22 $ make -f Makefile.rev2 clean
23 $ make -f Makefile.rev2 KEYMAP=plain
24
25 To program firmware push the button on converter and run:
26
27 $ make -f Makefile.rev2 KEYMAP=plain dfu
28
29
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`.
32
33
34 Keymap
35 ------
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.
37
38
39 PS/2 signal handling implementations
40 ------------------------------------
41 Following three methods can be used to implement PS/2 signal handling.
42
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.
49
50 To select method edit Makefile.
51
52
53 V-USB Support
54 -------------
55 With V-USB you can use this converter on ATmega(168/328) but it doesn't support NKRO at this time.
56
57 Circuit:
58
59 +---+ +---------------+
60 USB GND | | ATmega168 |
61 === C3 | |
62 5V <-------+--------+---|Vcc,AVCC | PS/2
63 R1 | | ====
64 D- <----+--+-----R2-----|INT1 RXD|------->DATA
65 D+ <----|---+----R3-----|INT0 XCK|------->CLOCK
66 Z1 Z2 | | ->5V
67 GND<----+---+--+--+-----|GND | ->GND
68 | | | |
69 | C2-+--|XTAL1 |
70 | X1 | |
71 +--C3-+--|XTAL2 |
72 +---------------+
73 R1: 1.5K Ohm
74 R2,R3: 68 Ohm
75 Z1,Z2: Zenner 3.6V
76 C1,C2: 22pF
77 C3: 0.1uF
78 X1: Crystal 20MHz(16MHz/12MHz)
Imprint / Impressum