Hello,
I remember seeing an idea of connecting multiple (more than 1) switches on a single Port(analog) pin and working with the adc val.
Cannot find this anymore on the forum.
Any help on this topic/idea.
regards
Hello,
I remember seeing an idea of connecting multiple (more than 1) switches on a single Port(analog) pin and working with the adc val.
Cannot find this anymore on the forum.
Any help on this topic/idea.
regards
I don't remember where is the link, but you can do it easily just like that.
From the analog port put some resistors in series to 5V. t the joints of the resistors put switch to ground. So every switch will result in different voltage at the ADC input. No switch pressed, the ADC will read 255 or 1023 (8 or 10 bit result).
Ioannis
Hi charudatt,
TIP #5 Scanning Many Keys With One Input
EDIT: TIP #7 4x4 Keyboard with 1 Input
Microchip’s Tips ‘n Tricks (DS40040C)
http://ww1.microchip.com/downloads/e...Doc/40040C.pdf
Hope this helps,
-Adam-
Last edited by Pic_User; - 3rd July 2007 at 14:25. Reason: Added TIP #7
Thank you Adam and Ioannis.
That was exactly what I was looking for.
regards
Bookmarks