Embedded Systems

____________________________________________________________________________________________________

• What is keypad(keyboard) ? –Â What you probably have in front of you, is a keyboard with more than 100 keys on it… If you are not familiar with the key matrices, then you may think that inside this keyboard, there is a chip that has at least the same number of inputs to read each key separately. Well, this is not true…

• What are the key matrices?–Â Â Â The matrices are actually an interface technique. According to this technique, the I/O are divided into two sections: the columns and the rows. You can imagine a matrix as an excel sheet. Here is a 4 x 4 matrix. The A,B,C and D are the columns and the 1,2,3 and 4 are the rows. There are 16 knots that the rows and columns intersect. To make a keypad matrix, we will have to connect a switch to each knot. The switch will have a push-to-make contact. When the operator pushes this switch, it will connect the column and the row that it corresponds to.

• How does keypad matrix works?Â â€“ Â Â To understand the operation principle, i will re-draw the above matrix without colors as you can see on above pic. I will also put connection switch to each row and column wire and show practical hardware pic. For the above 16-button 4×4 matrix, 8 pins of the microcontroller will be used. The first 4 pins will be OUTPUTS (gives logic â€˜1â€™)Â  and will be connected to the COLUMN wires, while the other 4 pins will be INPUTS (logic â€˜0â€™) and will be connected to the ROW wires. The matrix is controlled by a microcontroller. The OUTPUTS of the microcontroller will NOT all have power at the same time. The outputs will go high one by one in cycle. This happens many times per second. Â When operator press switch 11 (highlighted in red color), column C and row 3â€™s connection established, current pass from column C to row 3, and in actual sense row 3 read logic â€˜1â€™ from column D and microcontroller manipulate this connection and do work as we decided in programming.

• Applications –Â Â As you can see on above pics keypad is used in ATMs, cell phones and where multi parameter want to input.

## 1.Â Program ofÂ LCD and KEYPAD interfacing with PIC18f458

#### PROTEUS File for SIMULATION(Password Of RAR file is :-firmcodes.com)

Content for the tab VIDEO