How to connect 4 buttons Keypad to Microcontroller?

Discussion in 'Embedded Systems and Microcontrollers' started by SAMSOMA, Nov 25, 2008.

  1. SAMSOMA

    Thread Starter New Member

    Nov 25, 2008
    1
    0
    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
     
  2. beenthere

    Retired Moderator

    Apr 20, 2004
    15,815
    282
    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.
     
Loading...