I once saw a > "16-button analog keypad" circuit which used 1 pic i/o pin > configured as > analog input, (obviously) 16 momentary switches and some > resistors. The > theory behind it was that for each key pressed, a different > voltage would > be present to the analog input and the pic could tell what key was from > that voltage. > > -Mario Mario, Here www.ncsradio.com/schematics/keypad.pdf is an Eagle schematic .pdf showing an 8 switch version of what you want. The signal labelled PIC_AD_SW is tied to an A/D input pin on the PIC. If you calculate the voltages for each switch pressed, you'll see how this works. I use a table of the mid voltage between adjacent switches as the decision point for which switch is pressed. One feature of this design is that multiple switches pressed at the same time will not be confused with other switches; the lower number switch always has priority. If you want some more info on the algorithm I use for this design, let me know. Carey -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist