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

10 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  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 resistor. 1K-10K Ohm is OK.
  13. To change pin configuration edit **config.h** and **Makefile**.
  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. With V-USB you can use this converter on ATmega(168/328) but it doesn't support NKRO at this time.
  41. Circuit:
  42. +---+ +---------------+
  43. USB GND | | ATmega168 |
  44. === C3 | |
  45. 5V <-------+--------+---|Vcc,AVCC | PS/2
  46. R1 | | ====
  47. D- <----+--+-----R2-----|INT1 RXD|------->DATA
  48. D+ <----|---+----R3-----|INT0 XCK|------->CLOCK
  49. Z1 Z2 | | ->5V
  50. GND<----+---+--+--+-----|GND | ->GND
  51. | | | |
  52. | C2-+--|XTAL1 |
  53. | X1 | |
  54. +--C3-+--|XTAL2 |
  55. +---------------+
  56. R1: 1.5K Ohm
  57. R2,R3: 68 Ohm
  58. Z1,Z2: Zenner 3.6V
  59. C1,C2: 22pF
  60. C3: 0.1uF
  61. X1: Crystal 20MHz(16MHz/12MHz)