How to connect 4 buttons Keypad to Microcontroller?

Thread Starter

SAMSOMA

Joined Nov 25, 2008
1
HELLO Every one...

I'd like to ask how to connect keypad of 4 buttons (5 pins) to 8051 microcontroller.. :confused:

It would be better if the circuit is provided.. :)


THANKS
 

beenthere

Joined Apr 20, 2004
15,819
One pin of the keypad should be common to all. If you put circuit ground to it, and pull the other pins high through a resistor, you will see each button press will cause the pin associated with the button to go from a logic high to a low - say +5 volts to 0 volts. Use the same voltage as the 8051 is running on.

Wire the four active pins of the keypad to four input pins on the 8051 and there you are.
 
Top