You'd need to add at least one more resistor to have it recognize multiple keypresses, and even then you'd have to carefully choose your resistor values. Also keep in mind that the A/D shouldn't see more than 10k resistance, or you won't get fast accurate readings. -Adam David Harris wrote: >Hi- >Hey this is great! Can you push multiple keys? That should be possible, but we >would need a 16 bit A/D. >David H > >Dave Dilatush wrote: > >>David Harris wrote... >> >>>CHALLENGE: can you scan a keyboard, and run an LCD display with only 8 pins/bits >>>= 1 port -- without extra active hardware? >>> >>How about operating a keypad with nothing more than a single PIC A/D >>input pin? >> >>The diagram below shows how this can be done, by connecting the >>row/column lines of the keypad to resistors so that each key (the X's in >>the diagram below) results in a different resistance value. This >>resistance is connected, along with a load resistor (the 22K shown >>below), in a voltage divider between Vcc and ground; each key gives a >>different voltage, thus a different A/D reading. >> >>I didn't dream this up on my own, BTW, so I can't take "challenge" >>credit for it; I saw it about a year ago in the Design Ideas column in >>one of the electronics rags (either EDN or Electronic Design, I forget >>which). It should work, even if it is a little unusual... >> >> X-------X-------X-------X----------+--Vcc >> | | | | | >> | | | | | >> X-------X-------X-------X---4.7K---+ >> | | | | | >> | | | | | >> X-------X-------X-------X---10K----+ >> | | | | | >> | | | | | >> X-------X-------X-------X---15K----+ >> | | | | >> | 1.2K 2.4K 3.6K >> | | | | >> +-------+-------+-------+--> To PIC A/D Input >> | >> 22K >> | >> GND >> >>Hope this helps... >> >>Dave >> >>-- >>http://www.piclist.com#nomail Going offline? Don't AutoReply us! >>email listserv@mitvma.mit.edu with SET PICList DIGEST in the body >> > >-- >http://www.piclist.com#nomail Going offline? Don't AutoReply us! >email listserv@mitvma.mit.edu with SET PICList DIGEST in the body > > > > > -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu