3 HHKB pro has MCU and some chips on separate two PCBs.
7 M38K07M4 Renesas MCU with USB function
8 http://documentation.renesas.com/eng/products/mpumcu/rej03b0192_38k0ds.pdf
14 HC4051 Analog Multiplexer: select a row line.
15 http://www.ti.com/lit/ds/schs122j/schs122j.pdf
16 LS145 BCD Decoder: select a column line.
17 http://www.ti.com/lit/ds/symlink/sn74ls145.pdf
18 BU9831 Non-volatile electronic potentiometer: for calibration?
19 https://www.spezial.com/doc/rohm-a/bu9831.pdf
20 TP1683/4 Capacitive Sensing controller: no datasheet available.
30 Two PCBs are connected by 15 lines(13 in case of Pro2).
31 Vcc and GND use 3(2) lines each, other lines are for keyboard signaling.
34 JP Pro2 Pro Function Description Teensy++ pins
35 --------------------------------------------------------------------------------------------
39 3 3 4 TP1684 KEY: Low(0) when key pressed PE6 input(with pullup)
40 4 4 5 TP1684 KEY_PREV: make threshold PE7 output
41 5 5 6 HC4051 A(bit0)\ PB0 output
42 6 6 7 HC4051 B(bit1) > select row 0-7 PB1 output
43 7 7 8 HC4051 C(bit2)/ PB2 output
44 8 8 9 LS145 A(bit0)\ PB3 output
45 9 9 10 LS145 B(bit1) > select column 0-7 PB4 output
46 10 10 11 LS145 C(bit2)/ PB5 output
47 11 11 12 LS145 D(enable) Low(0) enables selected column PB6 output
51 14 HC4051(Z2) ~Enable of Z2 row0-7
52 15 HC4051(Z3) ~Enable of Z3 row8-15
54 NOTE: guessing pin5(KEY_PREV) may work for hysteresis of capacitive sensing.
55 NOTE: 1KOhm didn't work as pullup resistor on KEY. AVR internal pullup or 10KOhm resistor was OK.
56 NOTE: JP has two HC4051(Z2,Z3) and line 5, 6 and 7 are connected to both of them.
63 HHKB switch matrix is ghost-free and bounce-free.
67 ROW ---------------------------------------------------------------
70 2| 5 6 y t g h n _NONE_
71 3| 1 Esc Tab Control LShift LAlt LMeta Space
72 4| 7 8 u i k j m _NONE_
73 5| \ ` Delete Return Fn RShift RAlt RMeta
74 6| 9 0 o p ; l , _NONE_
75 7| - + ] [ ' / . _NONE_
80 ROW ---------------------------------------------------------------
81 0| ESC TAB LFn LShift LCtrl
93 C| BS Right RShift Enter
102 +-------------------------+-+-+-+-+-+-+-+ Vcc
103 |bias control? - - - - - - - - ---
104 | 3.9K*8 R R R R R R R R |
105 +--------^+ +--------+ - - - - - - - - |
106 | 2| | HC4051 <0-------|-|-|-|-|-|-|-|--|R|-+
107 | |capa. | <1-------|-|-|-|-|-|-|-|--|R|-+
108 | TP1684 |sense | <2-------|-|-|-|-|-|-|-|--|R|-+
109 | 11<------| <3-------|-|-|-|-|-|-|-|--|R|-+
110 | | | <4-------|-|-|-|-|-|-|-|--|R|-+
111 | | | <5-------|-|-|-|-|-|-|-|--|R|-+
112 | <-+ | <6-------|-|-|-|-|-|-|-|--|R|-+
113 | 1 4 | | | <7-------|-|-|-|-|-|-|-|--|R|-+
114 +---V---^-+ | +-^-^-^--+ 0 1 2 3 4 5 6 7 33K*8
115 KEY PREV | A B C +-----------------+
116 | | +-^----+ | | | | LS145 |
117 Vcc | | |BU9831| | | | +-^--^--^--^------+
118 --- | | +------+ | | | A B C D +-------+
119 | | | | | | | | | | | |
120 1-3 4 5 6 7 8 9 10 11 12 13-15 Pro |
121 1-2 3 4 5 6 7 8 9 10 11 12-13 Pro2|
122 +--------------------------------------------------+ |
124 +--------------------------------------------------+ GND
128 +-----------------------------+-+-+-+-+ Vcc
129 |bias control? - - - - - ---
131 +--------^+ +--------+ - - - - - |
132 | | | HC4051 <0-----------|-|-|-|-|----|R|-+
133 | |capa. | Z2 <1-----------|-|-|-|-|----|R|-+
134 | TP1684 |sense | <2-----------|-|-|-|-|----|R|-+
135 | <---+--| <3-----------|-|-|-|-|----|R|-+
136 | | | | <4-----------|-|-|-|-|----|R|-+
137 | | ~En| <5-----------|-|-|-|-|----|R|-+
138 | | +----> <6-----------|-|-|-|-|----|R|-+
139 | | | | | A B C <7-----------|-|-|-|-|----|R|-+
140 +---V---^-+ | | +-^-^-^--+ | | | | | |
141 KEY PREV | | | | | | | | | | |
142 | | | | +--------+ | | | | | |
143 | | | | | HC4051 <8-----------|-|-|-|-|----|R|-+
144 | | | | | Z3 <9-----------|-|-|-|-|----|R|-+
145 | | | +--| <A-----------|-|-|-|-|----|R|-+
146 | | | | <B-----------|-|-|-|-|----|R|-+
147 | | | | <C-----------|-|-|-|-|----|R|-+
148 | | | ~En| <D-----------|-|-|-|-|----|R|-+
149 | | | +-> <E-----------|-|-|-|-|----|R|-+
150 | | | | | A B C <F-----------|-|-|-|-|----|R|-+
151 | | | | +-^-^-^--+ 0 1 2 3 4 5 6 7 33K*8
152 | | | | | | | +-----------------+
153 | | | | | | | | LS145 |
154 Vcc | | | | | | | +-^--^--^--^------+
155 --- | | | | | | | A B C D +-------+
156 | | | | | | | | | | | | | |
157 1-2 3 4 14 15 5 6 7 8 9 10 11 12-13 |
158 +--------------------------------------------------+ |
160 +--------------------------------------------------+ GND
165 While pressing space bar, watched HHKB Pro original controller signals by logic analyzer.
166 Row and column is looping between 0-7 each for selecting a key.
167 A key is scaned every about 15ms, so scan rate is 66Hz.
171 Space bar locate at ROW:3 COL:7. A key is selected by HC4051(C,B,A) and LS145(C,B,A).
172 Key state can be read on TP1684(4/KEY) while asserting low on LS145(D).
180 rowC ____~~~~____~~~~ 3.8/3.8ms(JP) 7.7/7.7ms(Pro) S2 of HC4051
181 rowB __~~__~~__~~__~~ 1.9/1.9ms(JP) 3.8/3.8ms(Pro) S1 of HC4051
182 rowA _~_~_~_~_~_~_~_~ 1.0/1.0ms(JP) 1.9/1.9ms(Pro) S0 of HC4051
183 0123456701234567 selected row(Pro)
184 0123456789ABCDEF selected row(JP)
185 rowEn0 ________~~~~~~~~ 7.7/7.7ms(JP only) ~Enable of Z2 HC4051(JP only)
186 rowEn1 ~~~~~~~~________ 7.7/7.7ms(JP only) ~Enable of Z3 HC4051(JP only)
189 colC ____~~~~____~~~~ 550/410us(JP) / us(Pro)
190 colB __~~__~~__~~__~~ 200/210us(JP) 450/460us(Pro)
191 colA _~_~_~_~_~_~_~_~ 100/110us(JP) 220/230us(Pro)
192 0123456701234567 selected column
194 3) Wait 5us after column select, then set prev, strobe colD to spit out key status and read it.
195 prev _~~~~_____ 20us if previous key state is low
196 colD ~~~__~~~~~ 10us strobe
197 key ~~~____~~~ 22us indicates current state of the key
199 NOTE: JP scans twice fast as Pro/Pro2 does. So Pro/Pro2 scans 8x8 matrix in 15.4ms while JP scans 16x8 in that time.