On Wed, 22 Oct 1997 15:17:24 -0400 Mark Jurras writes: >I am trying to get a 12c508 to wake up from sleep using the WDT 18mS >interval. > >It wakes up the first time ok but the next time in won't. The Data >book >didn't reveal anything. The simulator acts funny after wake up so I >burnt a >part and it seems to run the loop once. If you want the program to run once every (approximately) 18ms, make every reset execute the program; when done, end with a SLEEP. If the program takes longer than 9 ms to run then it needs to have clrwdt instructions so it isn't stopped by a reset before it's done. To make the sleep interval as long and uniform as possible, clear WDT just before executing the SLEEP. The way your example is written, each WDT reset will just execute a few NOPs and put the chip to sleep again until the WDT resets it. The stuff after the SLEEP instruction will never execute. Only the first reset (power-on or MCLR) will get into the main program. But you've already discovered that.