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. This controller can work with HHKB Professional and Professional 2 model.
7 See [this thread][AltController] in geekhack.org.
9 [HHKB]: http://www.pfu.fujitsu.com/hhkeyboard/
10 [AltController]: http://geekhack.org/index.php?topic=12047.0
11 [Teensy]: http://www.pjrc.com/teensy/
16 * More keymap layers(more Fn keys)
20 See README of [tmk_keyboard] for more.
22 [tmk_keyboard]: http://github.com/tmk/tmk_keyboard
25 * No risk: Everything is all reversible
26 * Without PCB trace cutting, case mod or any destructives
27 * Can keep original controller intact
28 * Can change all HHKB behaviour as you like
32 * Lose USB hub function of Pro2
35 I'm not a professional of electronics nor MCU programming. This may damage your HHKB.
36 And my English writing is poor, I'm not sure I can convey my notions accurately.
40 See [doc/HHKB.txt](doc/HHKB.txt) and files under [doc/](doc/) for internal of HHKB and this controller.
43 ##Build Firmware & Program
44 You can choose some combination of hardware and USB protocol stack([LUFA], [PJRC]).
47 See [this document](../../doc/build.md).
49 ### TMK Alt Controller Board
50 $ make -f Makefile.tmk
52 This programs the controller with [dfu-programmer] if the tool is intalled and configured properly.
54 $ make -f Makefile.tmk dfu
56 Push reset button and program with [FLIP]. The tool should be intalled and configured properly.
58 $ make -f Makefile.tmk flip
60 Or you can also program with FLIP GUI.
62 [dfu-programmer]: http://dfu-programmer.sourceforge.net/
63 [FLIP]: http://www.atmel.com/tools/FLIP.aspx
67 Build with [LUFA] USB stack:
69 $ make -f Makefile.lufa
71 or with [PJRC] USB stack:
73 $ make -f Makefile.pjrc
75 Push reset button and program with [Teensy Loader(command line)]. The tool should be intalled and configured properly.
77 $ make -f Makefile.lufa teensy
78 $ make -f Makefile.pjrc teensy
80 Or you can also program with [Teensy Loader(GUI)].
82 [LUFA]: http://www.fourwalledcubicle.com/LUFA.php
83 [PJRC]: http://www.pjrc.com/teensy/usb_keyboard.html
84 [Teensy Loader(command line)]: http://www.pjrc.com/teensy/loader_cli.html
85 [Teensy Loader(GUI)]: http://www.pjrc.com/teensy/loader.html
88 ###AVR Mega with [V-USB]
90 $ make -f Makefile.vusb
92 Program [USBaspLoader] on MCU with AVR programmer like [AVRISPmkII] and tool like [avrdude].
94 You can programs with [avrdude] once you have programmed [USBaspLoader] on MCU.
95 $ make -f Makefile.vusb program
97 [AVRISPmkII]: http://www.atmel.com/tools/AVRISPMKII.aspx
98 [avrdude]: http://www.nongnu.org/avrdude/
102 See [tmk_keyboard] documents.
106 You have some options for hardware. Development boards with USB AVR family(ATMega32U4, AT90USB1286) like Teensy will work while MegaAVR with V-USB library is also cheapear option for DIY.
108 ###1. TMK Alt Controller Board
109 TMK designed [Keyboard Controller Board for HHKB Pro2(KiCad project)](https://github.com/tmk/HHKB_controller).
110 See [this post](http://geekhack.org/index.php?topic=12047.msg948923#msg948923).
113 ###2. PJRC Teensy++ 2.0 connection
117 | | HHKB pro HHKB pro2
118 | | ~~~~~~~~ ~~~~~~~~~
119 | PB0-2|------->ROW (6-8) (5-7)
120 | PB3-5|------->COL (9-11) (8-10)
121 | PB6|------->ENABLE (12) (11)
122 | PE6|<-------KEY (4) (3)
123 | PE7|------->PREV (5) (4)
125 | | 5V--- (1-3) (1-2)
126 | | GND--- (13-14) (12-13)
129 - NOTE: PJRC [Teensy](http://www.pjrc.com/teensy/)
130 [Teensy Loader]: http://www.pjrc.com/teensy/loader.html
132 ###3. V-USB connection
133 +---+ +---------------+
134 USB GND | | ATmega328p |
136 5V <-------+--------+---|Vcc,AVCC | HHKB pro pro2
138 D- <----+--+-----R2-----|INT1 PB2-4|------->ROW (6-8) (5-7)
139 D+ <----|---+----R3-----|INT0 PC0-2|------->COL (9-11) (8-10)
140 Z1 Z2 | PC3|------->ENABLE (12) (11)
141 GND<----+---+-----------|GND PB0|<-------KEY (4) (3)
142 | PB1|------->PREV (5) (4)
144 GND+-C2--+--|XTAL1 RXD|------->Debug Console
145 X1 | TXD|<-------Debug Console
146 GND+-C3--+--|XTAL2 RST|---SW--+GND
154 SW: Push Switch(for bootloader)
156 - NOTE: See [V-USB] documentation for more detail of hardware and the USB stack.
157 - NOTE: [USBaspLoader] is very useful for firmware update.
159 [V-USB]: http://www.obdev.at/products/vusb/index.html
160 [USBaspLoader]: http://www.obdev.at/products/vusb/usbasploader.html