I just wanted to add that this is being used heavily in many expensive surveillance cameras Uses a single input pin to handle a host of switch inputs. They publish the R values to be used at each switch. Since the unswitched value is 5V, and there are about 8 switches, it works out that each diffferent level is only about 0.7V. I used a CD4051 and 1% Rs to control the camera with me PIC. Very nice. --Bob Harold Hallikainen wrote: >>Yup, you can read multiple keys, but you can't quite do it in the manner >>Mike is suggesting. Mike is close, but has to change his resistor >>ladder to R, 2R, 4R.... to catch multiple keypresses and I wouldn't >>recommend going more than 5 buttons on a plain PIC pin (using the >>method kRC = T), or 7 buttons on an analog input since by the 7th >>button you're at 64R (getting close to 1% tolerance values) . >> >> > > >How about just going R, 2R like an R-2R D/A? It's simplest if your >switches are SPDT and switching between +5 and ground. You could use >resistor networks where the matching between resistors is much better than >the absolute tolernance. > >Harold > > > > -- Note: To protect our network, attachments must be sent to attach@engineer.cotse.net . 1-866-263-5745 USA/Canada http://beam.to/azengineer -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist