]> git.friedersdorff.com Git - max/tmk_keyboard.git/blob - converter/ps2_usb/README.md
lufa: Fix comment on INTERRUPT_CONTROL_ENDPOINT
[max/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 You can discuss about this converter here.
6
7 https://geekhack.org/index.php?topic=14618.0
8
9
10 Preassembled TMK PS/2-USB converter is available here.
11
12 https://geekhack.org/index.php?topic=72052.0
13
14
15 Build Firmware
16 --------------
17 For **TMK converter Rev.2**:
18
19     $ make -f Makefile.rev2 clean
20     $ make -f Makefile.rev2 KEYMAP=plain
21
22 To program firmware push the button on converter and run:
23
24     $ make -f Makefile.rev2 KEYMAP=plain dfu
25
26
27 For **TMK converter Rev.1** use `Makefile.rev1` instead.
28
29 If your use DIY converter with ATMega32u4 board you can use `Makefile.32u4`, but note that progarmming with 'dfu' may not work for your converter.
30
31
32 Build your own converter
33 ------------------------
34 Use ATMega32u4 as controller and Makefile.32u4 to build firmware.
35
36 1. Wire **Vcc** and **GND** properly.
37 2. Connect **Clock** to `PD1` and **Data** to `PD0` line. (Compatible to Soarer's converter pin configuration)
38 3. You need pull-up resistors on both signal lines. 1K-10K Ohm would be fine.
39
40 You can configure controller and pin configurations in Makefile and config.h.
41
42
43 Keymap
44 ------
45 To define your own keymap copy `unimap_plain.c` to `unimap_<name>.c` and edit it. Or just edit `unimap_plain.c` directly.
46
47 See wiki pages and documents.
48
49 https://github.com/tmk/tmk_keyboard/wiki
50
51
52 PS/2 signal handling implementations
53 ------------------------------------
54 Following three methods are available to implement PS/2 signal handling.
55
56 - **Interrupt** Uses pin interrupt to detect falling edge of clock line. **Recommended.** (ps2_interrupt.c)
57 - **Busywait** Implementation with portable C code for reference. (ps2_busywait.c)
58 - **USART** Uses AVR USART hardware engine to receive PS/2 signal. You must use this fothis for V-USB. (ps2_usart.c)
59
60 TMK converter rev1 uses **USART** and rev2 uses **Interrupt** for reference.
61
62 You can change method by editing `Makefile` but not needed in most case.
63
64
65 V-USB Support
66 -------------
67 With V-USB you can use this converter on ATmega(168/328). Use Makefile.vusb to build firmeware. Not supported actively anymore.
68
69 Circuit:
70
71                     +---+   +---------------+
72     USB            GND  |   |   ATmega168   |
73     ===                 C3  |               |
74     5V <-------+--------+---|Vcc,AVCC       |        PS/2
75                R1           |               |        ====
76     D- <----+--+-----R2-----|INT1        RXD|------->DATA
77     D+ <----|---+----R3-----|INT0        XCK|------->CLOCK
78             Z1  Z2          |               |      ->5V
79     GND<----+---+--+--+-----|GND            |      ->GND
80                    |  |     |               |
81                    |  C2-+--|XTAL1          |
82                    |     X1 |               |
83                    +--C3-+--|XTAL2          |
84                             +---------------+
85     R1:     1.5K Ohm
86     R2,R3:  68 Ohm
87     Z1,Z2:  Zenner 3.6V
88     C1,C2:  22pF
89     C3:     0.1uF
90     X1:     Crystal 20MHz(16MHz/12MHz)