This won't help much but, when I was setting up the WDT to wake me from sleep I found the documentation to be confusing but I think correct. When the PIC wakes up it executes the next instruction after the sleep statement. I am not sure that it sets bits. If the WDT times out when the PIC is awake the bits definitely are set and the PIC jumps to the interrupt vector. My problem was that the OSC didn't start-up correctly and after the WDT woke up the processor it would time out and interrupt the PIC. Took me two days with the PICMASTER and a FAE to figure that one out. If you want to sleep until RB0 and use the WDT you may just have to loop back to sleep when the WDT wakes you and check in the interrupt service routine to see if you have a WDT or RB0 interrupt. The more knowledgeable on this list can probably give you a better solution. - -Mark >>> NEIL GANDLER 21 November 1996 3:14 am >>> In a PIC application progrmam I an working on, when I want to reduce power consumption, I place the PIC in sleep mode. I have the watchdog timer active, and I would like to continue using the WDT. The problem is upon wakeup, I want to know if the wakeup is caused by the watchdog timer or my INT interrupt on RB0, which under normal circumstances works propery. I added the following code to test for the cause of the wakeup. sl SLEEP NOP BTFSS STATUS,4 (is the to' bit set? wakeup caused by wdt timeout?)) goto sl (no, go back to sleep) continue... (wakeup was not caused by WDT timeout) My problem is the PIC does not wake-up with a toggle on the RB0 pin (INT interrup) Appartantly when my pic wakes up and runs through the interupt routine, the TO bit gets manipulated, confusing my above mentioned code. But I checked my interrupt routine and I can't seem to find any instructions that would affect the TO bit. I also tried elimating the NOP statement, and having the first instruction after sleep BTFSS.... , still no luck. I would appreciate so help. Thanks.