|
9 yıl önce | |
---|---|---|
.. | ||
Makefile | 9 yıl önce | |
Makefile.mbed | 9 yıl önce | |
Makefile.pjrc | 9 yıl önce | |
Makefile.tmk_rev1 | 9 yıl önce | |
Makefile.tmk_rev2 | 9 yıl önce | |
Makefile.vusb | 9 yıl önce | |
README.md | 9 yıl önce | |
config.h | 9 yıl önce | |
config_mbed.h | 9 yıl önce | |
config_tmk_rev1.h | 10 yıl önce | |
config_tmk_rev2.h | 10 yıl önce | |
keymap_common.c | 9 yıl önce | |
keymap_common.h | 9 yıl önce | |
keymap_jis.c | 10 yıl önce | |
keymap_plain.c | 10 yıl önce | |
keymap_spacefn.c | 10 yıl önce | |
led.c | 12 yıl önce | |
main.cpp | 9 yıl önce | |
matrix.c | 9 yıl önce | |
usbconfig.h | 11 yıl önce |
This firmware converts PS/2 keyboard protocol to USB.(It supports Scan Code Set 2.)
In case of Teensy2.0(ATMega32U4):
PD1
and Data on PD0
.(Recommended. Soarer’s converter compatible)PD1
and Data on PD0
.PD5
and Data on PD2
.To change pin configuration edit config.h and Makefile.
For PJRC Teensy just run make
:
$ make clean
$ make
To select keymap:
$ make clean
$ make KEYMAP=[plain|jis|spacefn|...]
After that you will find HEX file ps2_usb_lufa.hex
in current directory.
For TMK converter Rev.1 use make -f Makefile.tmk_rev1
instead of make
and HEX file is ps2_usb_tmk_rev1.hex
.
For TMK converter Rev.2 use make -f Makefile.tmk_rev2
instead of make
and HEX file is ps2_usb_tmk_rev2.hex
.
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.
Following three methods can be 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 receive PS/2 signal.
To select method edit Makefile.
With V-USB you can use this converter on ATmega(168/328) but it doesn’t support NKRO at this time.
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)