1
0
Fork 0
qmk_firmware/converter/ps2_usb/README

123 lines
3.9 KiB
Text
Raw Normal View History

2011-01-17 12:51:51 +00:00
PS/2 to USB keyboard converter
==============================
2012-10-14 11:03:26 +00:00
This firmware converts PS/2 keyboard protocol to USB and supports only Scan Code Set 2.
This will works on USB AVR(ATMega32U4, AT90USB) or V-USB(ATMega168, 328...).
2011-01-17 12:51:51 +00:00
Features
--------
Mouse keys
You can emulates mouse move and button click using keyboard.
System/Media control
You can sends Power event, Volume down/up and Mute.
USB NKRO(actually 120KRO+8Modifiers)
2011-12-04 17:53:15 +00:00
You can tolggles NKRO feature.
2011-01-17 12:51:51 +00:00
Keymap customization
2011-12-04 17:53:15 +00:00
You can customize keymaps easily by editing source code. See keymap.c.
PS/2 signal handling implementations
------------------------------------
Following three methods are used to implement PS/2 signal handling.
2012-10-14 11:03:26 +00:00
a. Simple and stupid busy-wait(ps2.c)
This is expected to implemented with portable C code for reference.
b. Interrupt driven(ps2.c)
Uses external interrupt to detect falling edge of clock line.
c. USART hardware module(ps2_usart.c)
Uses AVR USART engine to recevie PS/2 signal. Recomended and default.
This is required to work with V-USB, preceding two methods tend to
miss signal edges while V-USB handles USB.
To select method edit Makefile.
Connect Wires
-------------
In case of Teensy2.0(ATMega32U4):
0. Connect Vcc and GND.
1. Connect Clock and Data line.
For a. Clock is on PF0 and Data on PF1.
For b. Clock is on PD1 and Data on PD2.
For c. Clock is on PD5 and Data on PD2.
2. Optionally you need pull-up register. 1K-10K Ohm is OK.
To change pin configuration edit config.h.
2011-12-04 17:53:15 +00:00
Build Frimware
--------------
1. Edit Makefile for build options and MCU setting.
Use 'atmega32u4' for Teensy 2.0 or 'at90usb1286' for Teensy++ 2.0.
2011-01-17 12:51:51 +00:00
2. make
2012-10-14 11:03:26 +00:00
Just type `make` in a terminal.
Use `-f Makefile.vusb` option to build V-USB converter.
Use `-f Makefile.jis` option to use JIS keyboard.
3. program MCU.
In case of Teensy use `Teensy Loader`.(http://www.pjrc.com/teensy/loader.html)
Otherwise you want to use `avrdude` or `dfu-programmer`.
2011-01-17 12:51:51 +00:00
2011-12-04 17:53:15 +00:00
Demonstration of Features
-------------------------
In default configuration, you can try several keymaps, mousekeys and USB NKRO.
Use following magic key combinations to enable some features.
keymaps and NKRO:
Magic+0: Qwerty with mousekeys(default)
Magic+1: Qwerty without mousekeys
Magic+2: Colemak
Magic+3: Dvorak
Magic+4: Workman
Magic+N: toggles NKRO/6KRO(6KRO by default)
Magic+Esc: sends Power Event(Power button)
where Magic=(LShift+RShift) or (LControl+RShift)
Fn layer function:
Fn0+(hjkl): Mousekey move(vi cursor like)
Fn0+(yuio): Mouse wheel(left,down,up,right)
Fn0+space: Mouse left button
Fn0+(mnb): Mouse buttons(m=left, n=right, b=middle)
Fn0+(zxc): Media control(Volup, Voldown, Mute)
Fn1+(hjkl): Cursor move(vi cursor like)
Fn1+(nm,.): Cursor move(Home,PageDown,PageUp,End)
where Fn0=;, Fn1=/
2011-02-25 13:46:13 +00:00
2011-01-17 12:51:51 +00:00
Keymap
------
2012-10-14 11:03:26 +00:00
You can change a keymap by editing code of keymap. See common/keycode.h for key symbols.
V-USB Support
-------------
You can also use this converter on ATmega(168/328) with V-USB instead of Teensy.
The converter on V-USB lacks some features for now: USB NKRO and System/Media control.
Circuit
-------
+---+ +---------------+
USB GND | | ATmega168 |
=== C3 | |
5V <-------+--------+---|Vcc,AVCC | PS/2
R1 | | ====
D- <----+--+-----R2-----|INT1 RXD|------->DATA
D+ <----|---+----R3-----|INT0 XCK|------->CLOCK
Z1 Z2 | | ->5V
GND<----+---+--+--+-----|GND | ->GND
| | | |
| C2-+--|XTAL1 |
| X1 | |
+--C3-+--|XTAL2 |
+---------------+
R1: 1.5K Ohm
R2,R3: 68 Ohm
Z1,Z2: Zenner 3.6V
C1,C2: 22pF
C3: 0.1uF
X1: Crystal 20MHz(16MHz/12MHz)
2011-01-17 12:51:51 +00:00
EOF