You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

README.md 2.9KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  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. Connect Wires
  5. -------------
  6. In case of Teensy2.0(ATMega32U4):
  7. 1. Connect **Vcc** and **GND**.
  8. 2. Connect **Clock** and **Data** line.
  9. - **Interrupt**: **Clock** is on `PD1` and **Data** on `PD0`.(Recommended. Soarer's converter compatible)
  10. - **Busywait**: **Clock** is on `PD1` and **Data** on `PD0`.
  11. - **USART**: **Clock** is on `PD5` and **Data** on `PD2`.
  12. 3. Optionally you need pull-up register. 1K-10K Ohm is OK.
  13. To change pin configuration edit config.h.
  14. Build Firmware
  15. --------------
  16. For **PJRC Teensy** just run `make`:
  17. $ make clean
  18. $ make
  19. To select keymap:
  20. $ make clean
  21. $ make KEYMAP=[plain|jis|spacefn|...]
  22. After that you will find HEX file `ps2_usb_lufa.hex` in current directory.
  23. - For **TMK converter Rev.1** use `make -f Makefile.tmk_rev1` instead of `make` and HEX file is `ps2_usb_tmk_rev1.hex`.
  24. - For **TMK converter Rev.2** use `make -f Makefile.tmk_rev2` instead of `make` and HEX file is `ps2_usb_tmk_rev2.hex`.
  25. Keymap
  26. ------
  27. 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.
  28. PS/2 signal handling implementations
  29. ------------------------------------
  30. Following three methods can be used to implement PS/2 signal handling.
  31. ### Simple and stupid busy-wait(ps2_busywait.c)
  32. This is expected to implemented with portable C code for reference.
  33. ### Interrupt driven(ps2_interrupt.c)
  34. Uses pin interrupt to detect falling edge of clock line.
  35. ### USART hardware module(ps2_usart.c)
  36. Uses AVR USART engine to receive PS/2 signal.
  37. To select method edit Makefile.
  38. V-USB Support
  39. -------------
  40. You can also use this converter on ATmega(168/328) with V-USB instead of Teensy.
  41. The converter on V-USB lacks some features for now: USB NKRO and System/Media control.
  42. Circuit:
  43. +---+ +---------------+
  44. USB GND | | ATmega168 |
  45. === C3 | |
  46. 5V <-------+--------+---|Vcc,AVCC | PS/2
  47. R1 | | ====
  48. D- <----+--+-----R2-----|INT1 RXD|------->DATA
  49. D+ <----|---+----R3-----|INT0 XCK|------->CLOCK
  50. Z1 Z2 | | ->5V
  51. GND<----+---+--+--+-----|GND | ->GND
  52. | | | |
  53. | C2-+--|XTAL1 |
  54. | X1 | |
  55. +--C3-+--|XTAL2 |
  56. +---------------+
  57. R1: 1.5K Ohm
  58. R2,R3: 68 Ohm
  59. Z1,Z2: Zenner 3.6V
  60. C1,C2: 22pF
  61. C3: 0.1uF
  62. X1: Crystal 20MHz(16MHz/12MHz)