tmk c9dee36e42 Make ps2_usart default and fix SpaceFN | 10 年之前 | |
---|---|---|
.. | ||
Makefile | 10 年之前 | |
Makefile.jis | 11 年之前 | |
Makefile.pjrc | 10 年之前 | |
Makefile.vusb | 11 年之前 | |
README.md | 10 年之前 | |
config.h | 10 年之前 | |
keymap_common.c | 10 年之前 | |
keymap_common.h | 10 年之前 | |
keymap_jis.c | 10 年之前 | |
keymap_plain.c | 10 年之前 | |
keymap_spacefn.c | 10 年之前 | |
led.c | 12 年之前 | |
matrix.c | 10 年之前 | |
usbconfig.h | 11 年之前 |
This firmware converts PS/2 keyboard protocol to USB and supports only Scan Code Set 2.
Following three methods are used to implement PS/2 signal handling.
This is expected to implemented with portable C code for reference.
Uses pin interrupt to detect falling edge of clock line.
Uses AVR USART engine to recevie PS/2 signal.
To select method edit Makefile.
In case of Teensy2.0(ATMega32U4):
To change pin configuration edit config.h.
Just run make
:
$ make
To select keymap:
$ make KEYMAP=[plain|jis|spacefn|...]
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 top README.md) and existent keymap files.
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)