> I am trying to use a push button to trigger the > external interrupt of RB0. However I need to implement > a s/w deboucing in my code to prevent multiple > triggering of the interrupt. > How do I go about writing the code for the s/w > deboucing? (using delays?) Most of my projects have some sort of periodic interrupt, often around 1mS. I debounce by checking that the input state has been constant for N interrupts. 50mS is usually a good debounce delay. It is essentially instantaneous in human terms, but most switches close or open completely well before that time. ***************************************************************** Embed Inc, embedded system specialists in Littleton Massachusetts (978) 742-9014, http://www.embedinc.com -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu