Hi It already works really well (comparing with the last night, when there was no RC filter - heaven and hell difference). I just got about 45 times in a row that interrupt was processed as expected (caused by the switch) as indicated by the test LED flashing frequency change. I am cleaning the interrupt flag right before RETFIE with BCF INTCON, 01h (which should clear INT0IF bit). If this keeps working well, I might just try replacing that big switch with something smaller and with some better push-to-'click' feel, before doing anything else with extra IC gates. Thanks, r. -----Original Message----- From: piclist-bounces@mit.edu [mailto:piclist-bounces@mit.edu] On Behalf Of Jinx Sent: Sunday, January 08, 2006 5:24 PM To: Microcontroller discussion list - Public. Subject: Re: [PIC]18F452 interrupt service routine > Unless I somehow push that switch button "awkwardly" then it > may get triggered twice (or at least it looks like it was twice) It might help if you clear INT0IF right before you leave the ISR, if you aren't already doing that. The flag could get set by contact noise during the ISR, and when GIE is re-enabled with RETFIE as you leave, PC will jump straight back into the ISR. If you have a short-ish ISR and RC debouncing this may not be the case, but that might depend on the quality of the switch -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist