If you are not interested in how it works, you can safely move on to the next section Patching in.
If you don't understand how a keyboard matrix works, I recommend you take a look at this. It's pretty important to at least have a grasp on how a keyboard circuit works before you'll be able to make much sense of this chapter.
My first job was to understand what each of the pins on the original header did. Working out the circuit took a bit of experimenting and probing with a multimeter. There is little use for you to do the same so I won't cover the tedious process. All that is important is the result.
Some of the keys on the original keyboard had some different modes depending on the position of the dip-switches on the base. To identify the keys, I'm going to use the same naming scheme that we will later use within the tmk firmware.
On each key, I've printed three values. Top is the tmk identifier. The Middle value is the column. The last is the row.
The complete factory matrix looks like this:
C0 | C1 | C2 | C3 | C4 | C5 | C6 | C7 | C8 | C9 | C10 | C11 | C12 | C13 | C14 | C15 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
R0 | K11 | K12 | K13 | K14 | K17 | K18 | K19 | K1A | K45 | |||||||
R1 | K10 | K20 | K15 | K16 | K1C | K1B | K0E | K41 | K30 | |||||||
R2 | K21 | K22 | K23 | K24 | K27 | K28 | K29 | K2A | K43 | K1D | K3B | |||||
R3 | K00 | K25 | K26 | K2B | K42 | K44 | K3C | |||||||||
R4 | K31 | K32 | K33 | K34 | K37 | K38 | K39 | K2C | ||||||||
R5 | K35 | K36 | K3A | K46 | K49 | K4A | K47 | K48 | ||||||||
R6 | K40 | K0D | K05 | K06 | K0C | K0B | K3D | |||||||||
R7 | K01 | K02 | K03 | K04 | K07 | K08 | K09 | K0A |
Each row and column requires one pin on your Teensy. It is possible to merge some columns together to reduce the total number of pins required. It's a good idea because it causes no harm, is simple to do and makes it easy add some new hacks in the future.
Straight away it's pretty obvious that a couple of the columns can be merged. I'm going to merge the following:
- C12 -> C1
- C14 -> C2
- C0 -> C3
- C13 -> C7
Afterwards, the matrix will look like this:
C1 | C2 | C3 | C4 | C5 | C6 | C7 | C8 | C9 | C10 | C11 | C15 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|
R0 | K11 | K12 | K13 | K14 | K17 | K18 | K19 | K1A | K45 | |||
R1 | K10 | K20 | K15 | K16 | K1C | K41 | K1B | K0E | K30 | |||
R2 | K21 | K22 | K23 | K24 | K27 | K28 | K29 | K2A | K43 | K1D | K3B | |
R3 | K00 | K3C | K25 | K26 | K2B | K42 | K44 | |||||
R4 | K31 | K32 | K33 | K34 | K37 | K38 | K39 | K2C | ||||
R5 | K4A | K48 | K35 | K36 | K47 | K3A | K46 | K49 | ||||
R6 | K0D | K40 | K05 | K06 | K0C | K0B | K3D | |||||
R7 | K01 | K02 | K03 | K04 | K07 | K08 | K09 | K0A |
Later on I will cover the LEDs but for now, the important thing is to get the keys working.
-
OC13
andC13
are the same thing. I have a feeling that it was a misprint -
The unusual thing about the Filco board is the diodes are on the rows. We could pretend that the 'C' doesn't mean column and 'R' doesn't mean row (which it actually may not), but that's a bit counter-intuitive. The tmk firmware expects the diodes to be on the columns so we will later have to lie to it. That is also counter-intuitive but perhaps one day in an update that will change. Never will what's printed on the board suddenly be different.