I've used this approach a couple times. In one case with 15 buttons. I did a single string of identical resistors (resistor network) between ground and +5V. The NO contact of each switch picked a point off the series string. The NC contact of one switch drove the common of the next switch. This gave a priority order to the switches and prevented invalid voltages when more than one switch was pressed. Harold > 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 > -- FCC Rules Updated Daily at http://www.hallikainen.com - Advertising opportunities available! -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist