Keyboard firmwares for Atmel AVR and Cortex-M
Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. Alternative Controller for HHKB Pro
  2. ===================================
  3. I wanted to add some features like vi cursor and mouse keys to my [HHKB][HHKB] but its controller is not programmable and
  4. firmware source code is not open, of course. This means customizing this keyboard needs to replace original
  5. controller with programmable one. For this purpose I used PJRC [Teensy++][Teensy] as alternative controller.
  6. [HHKB]: http://www.pfu.fujitsu.com/hhkeyboard/
  7. [Teensy]: http://www.pjrc.com/teensy/
  8. My keyboard firmware source tree is here: http://github.com/tmk/tmk_keyboard
  9. See directory keyboard/hhkb to build firmware for HHKB.
  10. ##Features
  11. * Customizable keymap
  12. * More keymap layers(more Fn keys)
  13. * Mouse keys
  14. * USB NKRO
  15. ###Pros
  16. * Without PCB trace cutting, case mod or any destructives
  17. * Can keep original controller intact
  18. * Can change all HHKB behaviour as you like
  19. ###Cons
  20. * Void your warranty
  21. * Lose USB hub function in case of Pro2
  22. ##DISCLAIMER
  23. I'm not a professional of electronics or MCU programming. This may damage your HHKB.
  24. And my English writing is poor, I'm not sure I can convey my notions accurately.
  25. ##Build Firmware
  26. You can choose some combination of MCU and USB protocol stack.
  27. ### Teensy++(AVR USB family) with [LUFA]
  28. 0. Edit **matrix.c** to use your pin configuration. See doc/HHKB.txt for detail.
  29. 1. Edit **keymap.c** to use your favoirte keymap.
  30. 2. Edit **Makefile** if you want to use other `MCU` than Teensy++ 2.0.
  31. 3. Build firmware binary file:
  32. `$ make -f Makefile.lufa`
  33. 4. Program MCU with PJRC [Teensy Loader] tool. If you install command line version of the loader just run:
  34. `$ make -f Makefile.lufa teensy`
  35. [LUFA]: http://www.fourwalledcubicle.com/LUFA.php
  36. [Teensy Loader]: http://www.pjrc.com/teensy/loader.html
  37. ###AVR Mega with [V-USB]
  38. Follow below if you want to use AVR with V-USB as .
  39. 0. Edit **matrix.c** to use your pin configuration. See doc/HHKB.txt for detail.
  40. 1. Edit **keymap.c** to use your favoirte keymap.
  41. 2. Edit **usbconfig.h** to configure V-USB options.
  42. 3. Edit **Makefile.vusb** to define `MCU` and `F_CPU`.
  43. 4. Build firmware binary file:
  44. `$ make -f Makefile.vusb`
  45. 5. Program MCU with AVR programmer like AVRISPmkII. If you already have [USBaspLoader] on MCU just run:
  46. `$ make -f Makefile.vusb program`
  47. [V-USB]: http://www.obdev.at/products/vusb/index.html
  48. [USBaspLoader]: http://www.obdev.at/products/vusb/usbasploader.html
  49. ###How to Customize Keymap
  50. Later...
  51. See **keymap.c**.
  52. ##Hardware
  53. ###Teensy++ installation
  54. Angled USB mini B adapter is used to install Teensy++ laterally.
  55. ![Image of Teensy install](hhkb/doc/HHKB_img/teensy_install.jpg)
  56. Bread baord wires are used to connect Teensy++.
  57. ![Image of Teensy wiring](hhkb/doc/HHKB_img/teensy_wiring.jpg)
  58. ![Image of Connector](hhkb/doc/HHKB_img/connector_contact.jpg)
  59. ###PJRC Teensy++ 2.0 connection
  60. +---------------+
  61. | Teensy++ |
  62. | |
  63. | | HHKB
  64. | | ~~~~
  65. | PB0-2|------->ROW(6-8)
  66. | PB3-5|------->COL(9-11)
  67. | PB6|------->ENABLE(12)
  68. | PE6|<-------KEY(4)
  69. | PE7|------->PREV(5)
  70. | |
  71. | |
  72. | |
  73. +---------------+
  74. ###V-USB circuit
  75. +---+ +---------------+
  76. USB GND | | ATmega168 |
  77. ~~~ C3 | |
  78. 5V <-------+--------+---|Vcc,AVCC | HHKB
  79. R1 | | ~~~~
  80. D- <----+--+-----R2-----|INT1 PB2-4|------->ROW(6-8)
  81. D+ <----|---+----R3-----|INT0 PC0-2|------->COL(9-11)
  82. Z1 Z2 | PC3|------->ENABLE(12)
  83. GND<----+---+-----------|GND PB0|<-------KEY(4)
  84. | PB1|------->PREV(5)
  85. | |
  86. GND+-C2--+--|XTAL1 RXD|------->Debug Console
  87. X1 | TXD|<-------Debug Console
  88. GND+-C3--+--|XTAL2 RST|---SW--+GND
  89. +---------------+
  90. R1: 1.5K Ohm
  91. R2,R3: 68 Ohm
  92. Z1,Z2: Zener 3.6V
  93. C1,C2: 22pF
  94. C3: 0.1uF
  95. X1: Crystal 20MHz(16MHz/12MHz)
  96. SW: Push Switch(Optional for bootloader)