> The compiler has compiled the if() statement properly. I "trapped" T0 > == 1 and it never happens. I can view on the logic analyzer that no > matter when the RB0/INT interrupt occurs relative to the periodic > wake-up due to WDT, DoTmerFn() is _always_ called. I want it to be > called only when the wakeup is due to WDT expiring. > > Any ideas? Yeah, check the INTF bit in INTCON. I have never used the TO bit in STATUS, but I would have thought it would be 0 after restart due to a watchdog timeout. This smells like something else is going on you aren't thinking about yet. ******************************************************************** Olin Lathrop, embedded systems consultant in Littleton Massachusetts (978) 742-9014, olin@embedinc.com, http://www.embedinc.com -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads