Search on this link, is a very usefull book. = http://ww1.microchip.com/downloads/en/DeviceDoc/40040b.pdf = = enjoy it = = = Pablo Ginhson = = = = = = = = = = > Date: Thu, 28 Jun 2007 18:19:39 -0700> From: marcel.duchamp@sbcglobal.net= > To: piclist@mit.edu> Subject: Re: [PIC] Multiple momentary button in 1 si= ngle pin> > Ariel Rocholl wrote:> > Hi all,> > > > I have only 1 pin availa= ble in a PIC16F micro but need to read 5-10> > momentary buttons, and do no= t want to use any other additional external IC.> > I figured out a way to w= ork this out using 1 single A/D pin to differentiate> > each button from th= e 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 combi= nation 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 c= an be pressed at a time and> > give a valid value, but this is not a requir= ement.> > > > Do you see any problem with this approach? Anybody used somet= hing like this> > before? Any other option you can suggest for multiple but= tons, 1 pin and no> > additional circuitry?> > > > Thanks in advance.> > > = > I used this technique to read a 12 position rotary switch; it worked > ve= ry well. Of course, this is a bit different from reading separate > pushbut= tons.> -- > http://www.piclist.com PIC/SX FAQ & list archive> View/change y= our membership options at> http://mailman.mit.edu/mailman/listinfo/piclist _________________________________________________________________ Prueba algunos de los nuevos servicios en l=EDnea que te ofrece Windows Liv= e Ideas: tan nuevos que ni siquiera se han publicado oficialmente todav=EDa. http://ideas.live.com -- = http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist