I've seen this method used. The issue that presented itself at the time was that multiple button presses could be detected as a single button press. I'm not sure how the issue was resolved. David > -----Original Message----- > From: Ariel Rocholl [mailto:foros@arocholl.com] > Sent: Thursday, June 28, 2007 8:20 PM > To: Microcontroller discussion list - Public. > Subject: [PIC] Multiple momentary button in 1 single pin > > Hi all, > > I have only 1 pin available in a PIC16F micro but need to read 5-10 > momentary buttons, and do not want to use any other > additional external IC. > I figured out a way to work this out using 1 single A/D pin > to differentiate > each button from the rest, provided I have different R-R > bridge for each > button, therefore if no button is pressed the A/D should read > 5V, but as > soon as a button is pressed, a R would move that to, say, > 2.8V. If all the > resistor combination are different and I can work with at least > 0.25Vdistance between them ( > e.g. 0.25V, 0.50V, 0.75V, 1V, etc), looks like a robust and > solid solution > to me. > > Only drawback I can see is no multiple buttons can be pressed > at a time and > give a valid value, but this is not a requirement. > > Do you see any problem with this approach? Anybody used > something like this > before? Any other option you can suggest for multiple > buttons, 1 pin and no > additional circuitry? > > Thanks in advance. > > -- > Ariel Rocholl > Madrid, Spain > -- > http://www.piclist.com PIC/SX FAQ & list archive > View/change your membership options at > http://mailman.mit.edu/mailman/listinfo/piclist > > -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist