Wednesday, April 16, 2014

INTERFACING OF 4x4 KEYPAD TO MICROCONTROLLER


INTERFACING OF 4x4 KEYPAD TO MICROCONTROLLER
  • Interfacing of microcontroller to 4x4 Keypad is very simple.
  • The Simple logic behind this is just scan all the key in the matrix.
  • Let assume 4 line are output and 4 lines are input.
  • Columns are input.
  • Row are output.





C1
C2
C3
C4
R1
0
1
2
3
R2
4
5
6
7
R3
8
9
A
B
R4
C
D
E
F


          C = Columns
          R = Rows
























Case 0:

C1
C2
C3
C4
R1
0
1
1
1
R2
1
1
1
1
R3
1
1
1
1
R4
1
1
1
1
  •  When Row and Column are shorted then it is accepted as Key Pressed Now C1 & R1 = 0.
  • That means “0”. 







Case 15:

C1
C2
C3
C4
R1
0
1
1
1
R2
1
1
1
1
R3
1
1
1
1
R4
1
1
1
0
  •  When Row and Column are shorted then it is accepted as Key Pressed Now C4 & R4 = 0.
  • That means “F”.








Similarly all other Keys are checked. While pressed we must wait to 20msec i.e. Debounce effect of switch button or key. If Still key is pressed then it’s assumed as key pressed and Equivalent value is displayed.























Thank you and for any queries do comment .....

For Program download it below link:
For LCD : Click for Code
For Keyboard : Click for code
For Videos on Above Program : Click on the Link






No comments:

Post a Comment