Check your power integrity. A brown out could cause this.=20 Larry Nelson Sr Www.mchipguru.com Perry Curling-Hope wrote: >I am using a PIC16F887 as a controller for a laboratory process. > >TMR1 is preloaded and allowed to timeout at 1sec a interval, the >interrupt >service routine then determines if the interrupt was caused by TMR1, >and >decrements a register containing a time countdown value, prompting the >process to advance when the register reaches zero. > >The Watchdog period is slightly greater than 1 second, (to accomodate >the >rest of the code execution loop) and the watchdog is cleared within the >interrupt service routine ( a watchdog light is toggled there as well) >On an occurrence of a reset, the timeout in STATUS register bit4 is >examined to determine if the reset was caused by the WDT, and the >program >redirected to resume execution in the correct place, else the normal >power >up initialisation and startup is executed. > >All works great....except....after some indeterminate period, varying >from >a couple of minutes to over 3 hours, the watchdog light stops and the >LCD >displaying the time countdown 'freezes', indicating that the micro has >ceased executing the loop. >One would expect that if the watchdog was not being serviced, a reset >would >ensue regardless and the machine would resume execution...somewhere. > >Not so....it appears 'dead', as if the LFINTOSC has ceased, which is >not >supposed to happen. >Even a 'hard' reset applied to the MCLR/Vpp pin (which is enabled and >effects an immidiate reset at all other times) does not restart the >micro'. > >Only a complete power down and restart through powering up again will >cause >the microcomputer to resume operation > >Any ideas would be much appriciated. > >--=20 >Perry Curling-Hope > >Research and Development >--=20 >http://www.piclist.com PIC/SX FAQ & list archive >View/change your membership options at >http://mailman.mit.edu/mailman/listinfo/piclist --=20 Sent from my Android phone with K-9 Mail. Please excuse my brevity. --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .