I recently wrote a program where ALL of my timing used the WDT. The way I avoided my part resetting is that all my timing and EEPROM subroutines had CLRWDT in them. Also, your prescaler will tell you how long you can go without using the CLRWDT before your part will reset. My part used an amazingly low 50uA. My target was < 500uA... Wesley Moore wrote: > > I recently had some unexplainable happenings whilst using a PIC and was > wondering if anyone could shed some light on why this may have been > happening. > > The circuit was essentially as follows: > A PIC 16F84 with PORTB connected to a 7-segment display via the required > resistors. The PIC was running at about 2.67 MHz (as checked with a CRO) > via a RC oscillator. > > The software essentially just gets a character to display from a look-up > table puts it on PORTB and then delays via a delay loop for about 600ms. > Then it gets the next character and does the same. When the character > returned form the look-up table is 0 it resets the count and starts > displaying the string from the beginning. What happened was it would > display the first 2 characters then appear to go back to the first. After > experimenting with slower RC combinations I found that a slower clock only > showed the first character the it blinked and it was there again. I came > to the conclusion that it was being reset so I reprogrammed it with the > watchdog timer off and what do you know it worked fine. > > Now I thought the WDT was only supposed to reset the thing when it stopped > working, not while it was working. Can anyone explain why this was > happening? > > The good thing to come out of it all is I've learnt some more and that > will no doubt help next time. > > ___________________________________________ > Wesley Moore > RMIT - BEng/BApp.Sc. 1st Year > > wmoore@cs.rmit.edu.au > http://wmoore.tsx.org/ -- Jason ======================================== Website: http://www.execpc.com/~milsumai E-Mail: milsumai@execpc.com ICQ # : 12978762 ======================================== .:::. ,,, _(- -)_ / ( ) \ \_/ : \_/ |_/ \_| | | | -TRY PRAYER-