Would someone refer me to a working example of tip #5 "Scanning many keys with one input" from "12f6xx - Tips and Tricks" from MicroChip. A link to the pdf is at the end of this message. Here is the complete text of that tip. ======== TIP #5 Scanning Many Keys With One Input The time required to charge a capacitor depends on resistance between VDD and capacitor. When a button is pressed, VDD is supplied to a different point in the resistor ladder. The resistance between VDD and the capacitor is reduced, which reduces the charge time of the capacitor. A timer is used with a comparator or changing digital input to measure the capacitor charge time. The charge time is used to determine which button is pressed. Software sequence: 1. Configure GP2 to output a low voltage to discharge the capacitor through I/O resistor. 2. Configure GP2 as one comparator input and CVRef as the other. 3. Use a timer to measure when the comparator trips. If the time measured is greater than the maximum allowed time, then repeat; otherwise determine which button is pressed. ======== There is a schematic diagram in the pdf Thanks, Rob Link to pdf version http://www.microchip.com/download/lit/pline/picmicro/families/12f6xx/40040b.pdf -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads