> So I've to detect the events with an external device, > maybe a capacitor, > or even a smaller capacitor with a MosFet. Hi Stef, I didn't make the point as clearly as Mike Hord "When GIE is cleared and any interrupt source has both its IE bit and IF set..... ......If the interrupt occurs after a SLEEP instruction the device will immediately wake from SLEEP" IOW, you are not meeting one of the requirements for the PIC to wake up, ie the IE bit is clear. So I'd expect, as the hardware is **capable** of waking the PIC, that the IF would be set in SLEEP but not wake the PIC up if IE is clear -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist