A 4X4 matrix keypad is useful for the function like a simple calculator or telephone. The 4X4 keypad has 16 keys which are arranged in push button switches in rows and columns. This keypad is followed by two other components, the 16-key encoder and the sensor pad. As you can see below is the diagram on a simple 4X4 matrix keypad.
This requires users to key in numbers in decimals or hexadecimals depending on the encoder that is programmed to the 4X4 keypad. The encoder will provide all the necessary logic inputs for the switches on the keypad. Below are block diagrams of the encoders from Fairchild Semiconductor and there are two different types; DIP(dual-inline package) and SOIC(small-outline integrated circuit).
Connection for the encoder are as follows;
As referenced from lms portal under Microcontroller technology, below is the truth table for the encoder. It is the 74C922 encoder from Fairchild Semiconductor. D | C | B | A | KEY | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 2 | 0 | 0 | 1 | 0 | 3 | 0 | 0 | 1 | 1 | F | 0 | 1 | 0 | 0 | 4 | 0 | 1 | 0 | 1 | 5 | 0 | 1 | 1 | 0 | 6 | 0 | 1 | 1 | 1 | E | 1 | 0 | 0 | 0 | 7 | 1 | 0 | 0 | 1 | 8 | 1 | 0 | 1 | 0 | 9 | 1 | 0 | 1 | 1 | D | 1 | 1 | 0 | 0 | A | 1 | 1 | 0 | 1 | 0 | 1 | 1 | 1 | 0 | B | 1 | 1 | 1 | 1 | C |
The encoder works when a key has been pressed, the Data Available pin goes high and the key value (0 – 15) is output from D – A. The logic levels of D – A and the corresponding key values are given in Table 1. For example, when the key 7 is pressed, the logic levels of D - A will be 1000. By connecting these signals to the microcontroller and implementing a look-up technique, all key presses can be easily detected and identified.
Lastly is the sensor pad, below is the block diagram for the QProx QT113 Touch Sensor
QProx QT113 Touch Sensor has only a single output OUT (Figure 2) that is used to indicate if someone touches