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.
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 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.