Ok, the Keyboard is comprised of 3 columns, the two outer columns have 5 switches each, and the center column has 4 switches. The switches are all lights. Pins 1 are white, are lamp Ground, pin 8, gray is lamp power. One side of the switch is jumpered together, pins 3 & 4, and there is a black wire attached as well, which makes this switch effectively an SPDT switch.
If you look down at the switch and hold the jumper (pins 1 and 2 ) on the right side, also has the black wire. The top is the normally open side, and has a yellow wire on it, so when the switch is depressed it closes. The bottom is normally closed, and has a blue wire on it.,so when the switch is depressed it opens. There are two connectors W5P1 & W5P4 coming from the switches. So there is the quandary, there are two ways to skin this cat (keyboard).
A) wire each of the 14 switches to input on an MCP23017, when a key is pressed an interrupt is generated and read the expander. Done. B) Don't screw with the keyboard anymore figure out the rows and columns a originally built. Rows go to one-half of the MCP23x08 the Columns go to the other then you need a scanner, that is triggered by a key press. Microchip has an application note AN1081 C) And let's not forget you can also achieve similar results as A) by using 2 7-bit priorities that are cascaded. |
|
W5P1 | W5P4 | ||||||||
---|---|---|---|---|---|---|---|---|---|
15 | 14 | 13 | 12 | 13 | 12 | 11 | 10 | 9 | 8 |
Blue | Yellow | Blue | Yellow | Gray | Yellow | Yellow | Blue | Blue | Gray |
Cut |
Overlay Power |