At 02:02 PM 6/8/01 -0700, you wrote: >erk... I knew that, I was just testing you. Good save. >Duh! If the processor went nuts, it could easily disable the WDT, which >would make it useless. Of course, there is nothing that prevents a whacked >out processor from getting stuck in a loop where the WDT is constantly being >reset either, but I suppose that would be a lot less likely. Yup, and as the programmer you can *make* it less likely by not doing silly things like resetting the WDT in a timer interrupt routine, by doing some basic checking to see if things "seem" to be ok, before resetting, that sort of thing. Even if the WDT requires resetting at a higher rate than the most complex operations in your program, you can have a countdown timer that inhibits the WDT reset if, say, an important result is not delivered every few seconds. The PIC has a circular buffer for the hardware stack, so this isn't a consideration for PICs, but on some processors I write a "canary" byte past the end of where the stack should end (in RAM). If the stack grows too far for some reason, it over-writes the byte (which is only set at power-up) and the WDT eventually resets everything. Best regards, =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Spehro Pefhany --"it's the network..." "The Journey is the reward" speff@interlog.com Info for manufacturers: http://www.trexon.com Embedded software/hardware/analog Info for designers: http://www.speff.com Contributions invited->The AVR-gcc FAQ is at: http://www.bluecollarlinux.com =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.