> Would someone refer me to a working example This basically does the same thing http://home.clear.net.nz/pages/joecolquitt/0pots.html measure btfsc pot ;bump measure while pot pin is low goto store ;else jump out and store count incf count1 goto measure In your case, pressing a button is moving Vcc rather than in my example, which moves the wiper, but to the cap it looks just the same -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads