20-Key Matrix Keypad
This Project was submitted to Parallax by William Richter
This is an ongoing project for a Home Theater System controller, and parts of the design are still in the planning stage. I design a project by breaking it down into individual tasks, and tackle each task separately. When the task has been wired on a breadboard, programmed, and tested for desired operation, it is incorporated into the overall project.
 |
Click on Image for a close-up |
This is just one task of the whole project, namely to control multiple functions of an Audio/Video processor from a 20-key keypad. The article is about interfacing a 20-key matrix keypad to a Stamp using a 74C923 keyboard encoder IC. It requires the use of only six I/O lines to do this. The same software can be used with minor modifications for the 74C922 16-key encoder IC, requiring five I/O lines. Additional IC components needed are a capacitor for the IC keyboard de-bounce, and another capacitor for the IC internal clock oscillator. This second capacitor is not needed if an external clock signal (10 kHz or less) is available.
The circuit also uses an NPN transistor and two resistors to invert the Data Available line for the active low Output Enable line of the IC. These components can be replaced by a spare inverter gate (of another IC) if available. The Output Enable could also be activated by another Stamp I/O pin, but the software program was written to minimize the number of Stamp pins required.
In addition, the software was written using PBASIC 2.5 to take advantage of its many new features that greatly simplify the code. The code was written in generic form so that it could be used in any situation requiring a matrix keypad input.
This is a picture of my breadboard setup with the 20-key keypad project in place. The breadboard was custom-built for the Stamp Activity Board. The plug strips are off-the-shelf items, and the power supply (out of sight under the board) is an old computer power supply bought at a local electronics surplus dealer. The interface board is a perfboard from RadioShack wired to a connecting cable for the Stamp board. This terminates in a 25-pin SIP socket for connections to the breadboard.
 |
Click on Image for a close-up |
The 16-key keypad is currently in use, to be replaced by the 20-key keypad. I included it to show the custom key labels (click on the picture to see a larger view).
Finally, the control board is used in conjunction with the keypad to control some functions of my Audio/Video Controller. It is being re-designed for the new keypad and will be replaced. One of the other pictures that I failed to attach shows an overall view of the control unit that includes a power supply board and an AC line monitor meter board in addition to the control board.
 |
Click on Image for a close-up |
|