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.4KB

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