> Problem occurs when reed opens again, a second or so later. > The contact bounce creates a couple of rising and falling edges > again, the latter of which trigger interrupts Put a trap at the start of the ISR to test the state of the b0 pin. Interrupts are turned off on entry to the ISR, so further transitions on b0 will have no effect. If you don't want to run the ISR code then simply wait until the bouncing has stopped and then jump to the retfie, which will re-enable INTE for the next legitimate closure. Make sure to clear INTF before leaving the ISR as the bouncing will set this flag, causing immediate re-entry into the ISR as soon as retfie is executed and interrupts are re-enabled Alternatively a simple RC filter should get rid of most of the noise so that b0 sees only one transition -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu