# 2022-09-06 Tracing the function board
This board holds 48 keys.
Arbitrarily numbering things:
- function clusters
- cluster A-D as seen from left to right from the front
- Note: cluster E is located on the main board (see later)
- columns 1-4 as seen from left to right from the front
- rows 1-3 as seen from top to bottom from the front
- cluster A-D as seen from left to right from the front
- key switches (red frame in above image):
- pin 1 is connected across the whole column
- pin 2 is connected across the whole row
- pin 3+4 are shorted to pin 2 when the switch is pressed
- between pins 1 and 2, there is a diode within the switch casing. This eliminates ghosting when multiple keys are pressed simultaneously.
- ribbon cable
- standard numbering; pin 1 is closest to [LIST IO] and pin 34 is closest to [MACRO 3/6]
Examining the board traces, I am relieved to find that the keys are laid out in a matrix, and that the four clusters are logically aligned in an interlaced square so that columns 1-4 are shared between clusters A+C and B+D, and rows 1-3 are shared between clusters A+B and C+D.
The 8 column lines (pin 1 on the key switches) are run directly to the ribbon cable, but the 6 row lines (pin 2 on the key switches) are run through a TI SN74LS138 demultiplexer (which, by the way, is rated to switch within 40ms, so scanning should be at no more than 25Hz). The demultiplexer reduces the line count to 4, which are run to the ribbon cable. The demultiplier outputs, and hence the return lines, are active LOW, so all except the signalled line(s) will be set HIGH.
Demultiplexer
Pin |
In |
Out |
1 |
Select A |
|
2 |
Select B |
|
3 |
Select C |
|
4 |
G2A |
|
5 |
G2B hardwired to GND |
|
6 |
G1 hardwired to 5V |
|
7 |
|
C+D row 3 |
8 |
GND |
|
9 |
|
A+B row 3 |
10 |
|
C+D row 2 |
11 |
|
A+B row 2 |
12 |
|
C+D row 1 |
13 |
|
A+B row 1 |
14 |
|
unused |
15 |
|
unused |
16 |
5V |
|
So it would seem that, to scan this board, I need to configure the G lines thusly:
G1 |
G2A |
G2B |
H |
L |
L |
and then run a binary sequence 2-7 through ribbon lines 23, 25, and 27 to power each cluster row's key switches (pin 2) as follows:
int |
bin |
r27 |
r25 |
r23 |
IC pin |
output (to key switches pin 2) |
0 |
000 |
L |
L |
L |
Y0, pin 15 |
unused |
1 |
001 |
L |
L |
H |
Y1, pin 14 |
unused |
2 |
010 |
L |
H |
L |
Y2, pin 13 |
A+B row 1 |
3 |
011 |
L |
H |
H |
Y3, pin 12 |
C+D row 1 |
4 |
100 |
H |
L |
L |
Y4, pin 11 |
A+B row 2 |
5 |
101 |
H |
L |
H |
Y5, pin 10 |
C+D row 2 |
6 |
110 |
H |
H |
L |
Y6, pin 9 |
A+B row 3 |
7 |
111 |
H |
H |
H |
Y7, pin 7 |
C+D row 3 |
Any pressed key switches (pin 1) should then be signalled on (odd-numbered) ribbon lines 1-15:
keypress |
ribbon line |
A+C col 1 |
1 |
A+C col 2 |
3 |
A+C col 3 |
5 |
A+C col 4 |
7 |
B+D col 1 |
9 |
B+D col 2 |
11 |
B+D col 3 |
13 |
B+D col 4 |
15 |
So for instance, to test whether the [SYSTM] key (cluster A, row 2, col 1) is being pressed, I should set lines 23 and 25 LOW and line 27 HIGH (for cluster A row 2), and check for a LOW on ribbon line 1 (for cluster A col 1). Similarly, pressing [LIST] (cluster B, row 3, col 1) should give a LOW signal on ribbon line 9 when line 23 is set low and lines 25 and 27 are set high; and pressing [EJECT] (cluster C, row 1, col 4) should give a LOW signal on ribbon line 7 when lines 23 and 25 are set high and 27 is set low.
Meanwhile, G2A (on ribbon line 17) should be pulled low.
Having seen this, I expect the other boards to use the same signal return lines, but separate demultiplexer select lines.
According to the demultiplexer's data sheet, the voltage on ribbon pin 6/8/10 should be between +4.5V and 5.5V; the voltage on ribbon pins 23/25/27 should be between 2V and 5V; and the output voltage would be between 2.5V and 3.5V. These values indicate that it's safe to test with the RasPi2B+ that I already have.
Update: Yup, that works as per datasheets. Good to know.
This is what I now know about the ribbon cable:
Ribbon line |
Source |
Signal |
1 |
Function board |
A+C col 1 |
3 |
Function board |
A+C col 2 |
5 |
Function board |
A+C col 3 |
6 |
Main board |
5V |
7 |
Function board |
A+C col 4 |
8 |
Main board |
5V |
9 |
Function board |
B+D col 1 |
10 |
Main board |
5V |
11 |
Function board |
B+D col 2 |
13 |
Function board |
B+D col 3 |
15 |
Function board |
B+D col 4 |
17 |
Main board |
Function board G2A |
23 |
Main board |
Demultiplexer Select A |
25 |
Main board |
Demultiplexer Select B |
26 |
Main board |
GND |
27 |
Main board |
Demultiplexer Select C |
28 |
Main board |
GND |
30 |
Main board |
GND |
32 |
Main board |
GND |
34 |
Main board |
GND |
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.