Clock Radio
Switch Matrix
Thu Sep 16 2021 22:43
I'm mapping out the buttons, switches, mounting holes, etc. on this main board so I can design a replacement. I thought it was going to be awkward to use three more individual GPIOs for the three buttons on the main board, when the buttons on the bottom board are conveniently matrixed.
I realized I could be clever and use the same matrix for those buttons and add a row. That's eleven buttons so a 3x4 matrix only wastes one position. Then I remembered there is a twelfth button, the snooze button, which is also on the main board.
"Son of a bitch, that's what they did, isn't it? This is all one matrix."
So I check the board, and that is indeed what they did. Four rows, three columns, all buttons accounted for.
Row\Col | C1 | C2 | C3 |
---|---|---|---|
R1 | 4 | BAND | 5 |
R2 | 1 | 3 | 2 |
R3 | ON | Snooze | OFF |
R4 | Tune + | Enter | Tune - |