> How about operating a keypad with nothing more than a > single PIC A/D input pin? Dave, I was thinking along similar lines last night for multiple toggle switches, so thanks for bringing it up http://home.clear.net.nz/pages/joecolquitt/mixer.html One function of the PIC is to produce two pairs of antiphase PWM, the properties of which are set by the pots and switches As you can see, there are just four switches as part of a voltage divider. Although the number of switches can be increased, the resolution of the ADC would eventually need to be increased also. The reason is because this is slighly different to the 4x4 question, as I need to detect any combination of switches from "all off" to "all on", ie 16 clear and distinct values (as David Harris has mentioned). If they were 0x10 apart coming from the ADC that would be wonderful. I've done similar work before so not expecting any major problems Although it's not needed for this job, I did wonder how many switches (or keys) could be used if that spare 4051 input was employed. I may have put this up as a challenge at some time, so now seems a good opportunity. As yet I've not tested any values for the 5 resistors in the circuit -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body