EDN Access -- 10.13.94 4-bit µP's A/D converter decodes keypad's input
-- EDN, October 13, 1994

Design Ideas:October 13, 1994
4-bit µP's A/D converter decodes keypad's inputs
Zhaohua Zhu,
Ryoden International (Shanghai) Ltd, Shanghai, China
Fig 1 shows a Mitsubishi M50927-XXXSP/FP 4-bit microcontroller decoding a 4x4 keypad using only four digital I/O lines instead of eight. Saving four of a 4-bit µC's precious I/O lines couild be significant.
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 |
| EDN Access | feedback | subscribe to EDN! |
| design features | design ideas | columnist |





















