Redwood Shores, 6 augustus 2008. > I'm polling PORTB in a neat little debouncing routine I was taught in > class last semester. If your PIC has schmitt trigger inputs you can get away with just using a 0.1uF capacitor and a 100kOhm resistor (resistor to +5V, switch to ground, capacitor to ground (across switch). 0.1uF*100kOhm=10ms, which is generally the "bounce" time of a typical switch. I used it succesfully in a number of projects. Greetings, Maarten Hofman. -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist