Adam Bryant wrote: > > Katherine, > To set the configuration bits for a PIC (including enabling the WDT), I use > the "__CONFIG" > directive in my application as follows: Thanks for listing these. I was a bit lazy... > instruction within 128 cycles, the WDT will reset the PIC. So your main > application > loop may look like the following: > > Main > CLRWDT > CALL subroutine1 > CALL subroutine2 > CALL subroutine3 > GOTO Main > > If any of the subroutines "hang", the WDT will not get cleared and the PIC > will be reset. This is true for most cases, but not all cases. What if one of your subroutines caused another to stop working? For instance, you have a few routines that process serial data. One waits for (carriage return) before setting a flag to start the processing of the data. For some reason, it missed the . The main loop will still run perfectly, and theoretically, the program is working as it should, but your automatic garage door still closes on your kid. For *certain* people with more kids than the average high school (Hi Andy!) this may be a bigger problem . Say the data looks like this : Garage Door : Open or Garage Door : Close or Garage Door : Check Switch Say the 'check switch' stream is transmitted every 500ms. You know that if this stops there is a problem, right? Your program looks like this : /********* Interrup service routine *********/ /** 100ms Timed interrupt **/ If (Watch_Handle_Data_Thing<255) then increase Watch_Handle_Data_Thing If (Watch_Some_Other_Routine<255) then increase Watch_Some_Other_Routine Watch_Interrupt_Operation = 0 /** Serial data handling Stuff **/ If ((Char received) and (buffer pointer<28)), place in buffer If (Char=