Design Ideas: October 13, 1994
The 4-bit µC's ADC provides the key to the savings. The µC's output lines, F1 through F4, energize the keypad's column lines one at a time via 74HC4049 buffer/driver. If a user presses a key, the µC's ADC reads an analog voltage coresponding to the row of the pressed key. The resistors that the keypad's keys connect to the µC's ADC determine the voltage that the ADC sees. Table 1 lists these voltages.
Scanning each of the columns for a 3-msec period provides good response. Connect the ADC's reference to +5V. The 74HC4049 buffer/driver ensures that the voltage applied to the keypad's columns is a full 5V. (DI 1594)
| Table 1--Voltages vs row of key pressed | |
|---|---|
| Voltage (V) | Row of Key pressed |
| 5 | First |
| 3.75 | Second |
| 2.50 | Third |
| 1.25 | Fourth |
| 0.00 | no key |