Hi, Also Microchip has the tips&tricks doc which describes such possibilities (tips 5, 6 and 7): http://ww1.microchip.com/downloads/en/DeviceDoc/40040C.pdf Regards, Tamas On 6/29/07, Marcel Duchamp wrote: > > Ariel Rocholl wrote: > > 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. > > > > I used this technique to read a 12 position rotary switch; it worked > very well. Of course, this is a bit different from reading separate > pushbuttons. > -- > 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