]> git.gir.st - tmk_keyboard.git/blob - converter/ps2_usb/README
Fix projects for new keycodes
[tmk_keyboard.git] / converter / ps2_usb / README
1 PS/2 to USB keyboard converter
2 ==============================
3 This firmware converts PS/2 keyboard protocol to USB and supports only Scan Code Set 2.
4 This will works on USB AVR(ATMega32U4, AT90USB) or V-USB(ATMega168, 328...).
5
6
7 Features
8 --------
9 Mouse keys
10 You can emulates mouse move and button click using keyboard.
11 System/Media control
12 You can sends Power event, Volume down/up and Mute.
13 USB NKRO(actually 120KRO+8Modifiers)
14 You can tolggles NKRO feature.
15 Keymap customization
16 You can customize keymaps easily by editing source code. See keymap.c.
17
18
19 PS/2 signal handling implementations
20 ------------------------------------
21 Following three methods are used to implement PS/2 signal handling.
22 a. Simple and stupid busy-wait(ps2.c)
23 This is expected to implemented with portable C code for reference.
24 b. Interrupt driven(ps2.c)
25 Uses external interrupt to detect falling edge of clock line.
26 c. USART hardware module(ps2_usart.c)
27 Uses AVR USART engine to recevie PS/2 signal. Recomended and default.
28 This is required to work with V-USB, preceding two methods tend to
29 miss signal edges while V-USB handles USB.
30
31 To select method edit Makefile.
32
33
34 Connect Wires
35 -------------
36 In case of Teensy2.0(ATMega32U4):
37 0. Connect Vcc and GND.
38 1. Connect Clock and Data line.
39 For a. Clock is on PF0 and Data on PF1.
40 For b. Clock is on PD1 and Data on PD2.
41 For c. Clock is on PD5 and Data on PD2.
42 2. Optionally you need pull-up register. 1K-10K Ohm is OK.
43
44 To change pin configuration edit config.h.
45
46
47 Build Frimware
48 --------------
49 1. Edit Makefile for build options and MCU setting.
50 Use 'atmega32u4' for Teensy 2.0 or 'at90usb1286' for Teensy++ 2.0.
51 2. make
52 Just type `make` in a terminal.
53 Use `-f Makefile.vusb` option to build V-USB converter.
54 Use `-f Makefile.jis` option to use JIS keyboard.
55 3. program MCU.
56 In case of Teensy use `Teensy Loader`.(http://www.pjrc.com/teensy/loader.html)
57 Otherwise you want to use `avrdude` or `dfu-programmer`.
58
59
60 Demonstration of Features
61 -------------------------
62 In default configuration, you can try several keymaps, mousekeys and USB NKRO.
63 Use following magic key combinations to enable some features.
64
65 keymaps and NKRO:
66 Magic+0: Qwerty with mousekeys(default)
67 Magic+1: Qwerty without mousekeys
68 Magic+2: Colemak
69 Magic+3: Dvorak
70 Magic+4: Workman
71 Magic+N: toggles NKRO/6KRO(6KRO by default)
72 Magic+Esc: sends Power Event(Power button)
73
74 where Magic=(LShift+RShift) or (LControl+RShift)
75
76 Fn layer function:
77 Fn0+(hjkl): Mousekey move(vi cursor like)
78 Fn0+(yuio): Mouse wheel(left,down,up,right)
79 Fn0+space: Mouse left button
80 Fn0+(mnb): Mouse buttons(m=left, n=right, b=middle)
81 Fn0+(zxc): Media control(Volup, Voldown, Mute)
82 Fn1+(hjkl): Cursor move(vi cursor like)
83 Fn1+(nm,.): Cursor move(Home,PageDown,PageUp,End)
84
85 where Fn0=;, Fn1=/
86
87
88 Keymap
89 ------
90 You can change a keymap by editing code of keymap. See common/keycode.h for key symbols.
91
92
93 V-USB Support
94 -------------
95 You can also use this converter on ATmega(168/328) with V-USB instead of Teensy.
96 The converter on V-USB lacks some features for now: USB NKRO and System/Media control.
97
98 Circuit
99 -------
100 +---+ +---------------+
101 USB GND | | ATmega168 |
102 === C3 | |
103 5V <-------+--------+---|Vcc,AVCC | PS/2
104 R1 | | ====
105 D- <----+--+-----R2-----|INT1 RXD|------->DATA
106 D+ <----|---+----R3-----|INT0 XCK|------->CLOCK
107 Z1 Z2 | | ->5V
108 GND<----+---+--+--+-----|GND | ->GND
109 | | | |
110 | C2-+--|XTAL1 |
111 | X1 | |
112 +--C3-+--|XTAL2 |
113 +---------------+
114 R1: 1.5K Ohm
115 R2,R3: 68 Ohm
116 Z1,Z2: Zenner 3.6V
117 C1,C2: 22pF
118 C3: 0.1uF
119 X1: Crystal 20MHz(16MHz/12MHz)
120
121
122 EOF
Imprint / Impressum