R
Rodo
Guest
Hi all,
I was trying to reduce the pins used by a keypad (4 keys) and I thought I
should be able to read the value with one channel of a PIC ADC. I'm getting
the feeling is not possible. With 4 sw I figure I need to detect 16
combinations (0000=vcc=5v=no key pressed, 1111=all sw on=least resistance).
I was doing some calculations with on resistor in series (1k) after Vcc and
then, the 4 sw in parallel (each sw has a series resistor with it).
I assigned voltages in a truth table from all sw open (Vout=5v) to all
closed (1111=5v/16=0.3125). I calculate the value for the individual
resistors when they're closed by themselves. Then, I checked the voltage
when they are in parallel with one or two more sw and the output voltage
does not match my table.Since this stuff is all linear, I came to the
conclusion that It can not be done. Actually the massive headache I have at
the moment is impairing my thought process .
Any comments, suggestions, or application notes available are welcome.
Thanks
I was trying to reduce the pins used by a keypad (4 keys) and I thought I
should be able to read the value with one channel of a PIC ADC. I'm getting
the feeling is not possible. With 4 sw I figure I need to detect 16
combinations (0000=vcc=5v=no key pressed, 1111=all sw on=least resistance).
I was doing some calculations with on resistor in series (1k) after Vcc and
then, the 4 sw in parallel (each sw has a series resistor with it).
I assigned voltages in a truth table from all sw open (Vout=5v) to all
closed (1111=5v/16=0.3125). I calculate the value for the individual
resistors when they're closed by themselves. Then, I checked the voltage
when they are in parallel with one or two more sw and the output voltage
does not match my table.Since this stuff is all linear, I came to the
conclusion that It can not be done. Actually the massive headache I have at
the moment is impairing my thought process .
Any comments, suggestions, or application notes available are welcome.
Thanks