> You should only have to check the CCP2IF in your interrupt handler. > > Simply clear CCP2IE and CCP2IF in your mainline code when you don't > want to use the capture. > To reenable capturing set CCP2IF I think his problem is that other events might set CCP2IF when he's not using it to capture pulses. This might confuse the interrupt routine if it gets an interrupt for one of the other reasons. An easy solution for this is to check the CCP2 interrupt last in the interrupt routine. You shouldn't get there unless the CCP2 interrupt is enabled. ***************************************************************** 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