Hi, On Wed, May 11, 2005 at 04:26:30PM -0400, peiserma@ridgid.com wrote: > piclist-bounces@mit.edu wrote: > > TO should be "1" after power-up, CLRWDT or Sleep. > > yes. But it should also be '0' after WDT. At least according > to the datasheet. Hence my confusion. Your not confused. On WDT timeout /TO will equal 0. > > TO is a poor indicator since you do not know if it was a sleep or > > reset that triggered it. Therefore leave TO out of your program. > > makes sense, since according to the datasheet TO will always be > zero after WDT. I don't agree about leaving /TO out of the program. The datasheet seems pretty clear that on reset /TO is 1. I've got a program on a 12F629 right now where I check for timeouts using this bit. > I must still be misunderstanding something. The way I read the > tables (10-6, 10-4, and also the STATUS register), TO should always > be zero after WDT, whether the PIC was sleeping or not. But the > simulator shows TO to be '1' So what is it supposed to be? Is the > simulator wrong or the datasheet? Or is it my interpretation? When I see something like this happen in MPLAB I just close and restart the program. I've had to do this plenty of times with MPLAB 6.x when, for instance, "movlw 0xf4" would be executed and the watch window would show a completely different value for W. What version of MPLAB are you using? Take care, Matthew. -- "We do not embrace reason at the expense of emotion. We embrace it at the expense of self-deception." -- Herbert Muschamp -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist