4 Button Keypad

Status
Not open for further replies.

Zegsy

New Member
Hi All,

How can I implement a 4 button keypad for PIC16f627 to simulate Nigel Goodwin tutorial on 4x4 hex keypad.
Am trying my hands on the tutorial with a PIC kit I've got and it has just 4 buttons for input.

Thanks.
 
Hi All,

How can I implement a 4 button keypad for PIC16f627 to simulate Nigel Goodwin tutorial on 4x4 hex keypad.
Am trying my hands on the tutorial with a PIC kit I've got and it has just 4 buttons for input.

You don't, there's no need to multiplex four buttons, see tutorial two instead.
 
You could also connect all 4 switches to 1 ADC input - with resistors pulling each high. Each pull up resistor would have a different value, say 2k, 4k, 8k, 16K.

So when a switch is activated, it would know, not only that a switch is pressed, but it could tell which switch, by the ADC value. This could also tell if multiple switches are pressed simultaneously.

If you have 4 I/O pins available, Nigel's method would be easier to code.

Brian
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…