]> git.gir.st - tmk_keyboard.git/blob - converter/ps2_usb/README.md
Merge commit '657d9f23fe47fb88cf221adb23095082f191ba6a'
[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 In case of Teensy2.0(ATMega32U4):
9
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.
16
17 To change pin configuration edit **config.h** and **Makefile**.
18
19
20 Build Firmware
21 --------------
22 For **PJRC Teensy** just run `make`:
23
24 $ make clean
25 $ make
26
27 To select keymap:
28
29 $ make clean
30 $ make KEYMAP=[plain|jis|spacefn|...]
31
32 After that you will find HEX file `ps2_usb_lufa.hex` in current directory.
33
34
35 - For **TMK converter Rev.1** use `make -f Makefile.tmk_rev1` instead of `make` and HEX file is `ps2_usb_tmk_rev1.hex`.
36
37 - For **TMK converter Rev.2** use `make -f Makefile.tmk_rev2` instead of `make` and HEX file is `ps2_usb_tmk_rev2.hex`.
38
39
40 Keymap
41 ------
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.
43
44
45 PS/2 signal handling implementations
46 ------------------------------------
47 Following three methods can be used to implement PS/2 signal handling.
48
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.
55
56 To select method edit Makefile.
57
58
59 V-USB Support
60 -------------
61 With V-USB you can use this converter on ATmega(168/328) but it doesn't support NKRO at this time.
62
63 Circuit:
64
65 +---+ +---------------+
66 USB GND | | ATmega168 |
67 === C3 | |
68 5V <-------+--------+---|Vcc,AVCC | PS/2
69 R1 | | ====
70 D- <----+--+-----R2-----|INT1 RXD|------->DATA
71 D+ <----|---+----R3-----|INT0 XCK|------->CLOCK
72 Z1 Z2 | | ->5V
73 GND<----+---+--+--+-----|GND | ->GND
74 | | | |
75 | C2-+--|XTAL1 |
76 | X1 | |
77 +--C3-+--|XTAL2 |
78 +---------------+
79 R1: 1.5K Ohm
80 R2,R3: 68 Ohm
81 Z1,Z2: Zenner 3.6V
82 C1,C2: 22pF
83 C3: 0.1uF
84 X1: Crystal 20MHz(16MHz/12MHz)
Imprint / Impressum