0% found this document useful (0 votes)
68 views

Keypad Interfacing With 8051

Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
68 views

Keypad Interfacing With 8051

Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 8

Keypad Interfacing with 8051

Dr.C.Suganthi Evangeline
4X4 Matrix Keypad
Scanning of Keys-Before Key press

To detect a pressed key, the microcontroller grounds all


rows by providing 0 to the output latch.
After Key press

•If one of the column bits has a zero, this means that a key press
has occurred.
•For example, if C1:C4 = 1011, this means that a key in the C2
column has been pressed.
•After detecting a key press, microcontroller will go through the
process of identifying the key.
Process of Identifying the Key

 Starting from the top row, the microcontroller will ground it by providing a low
to row R1 only.
 Now read the columns, if the data read is all 1s, no key in that row is pressed and
the process continues for the next row.
 So, now ground the next row, R2. Read the columns, check for any zero and this
process continues until the row is identified.
 E.g. In above case we will get row 2 in which column is not equal to 1111.
 So, after identification of the row in which the key has been pressed we can easily
find out the key by row and column value.

You might also like