... or... you can think about the WDT as a real dog that wants to bite your leg if you don't feed him every certain time.... :) It means what? If you leave your house, the next intruder will have severe leg dog marks... The main reason of the WDT is that software sometimes got lost, enter in infinite loops, some unexpecetd situation puts a routine to go crazy and all. The WDT unique intention is to reset the machine if certain programmable timer expires. So, your "normal operative" software should "reset" the WDT before it resets the machine, so if you program the WDT to 1 second, you should reset (CLRWDT) before that happens. If you routine gets lost, the WDT will reset your machine in one second, so not much is wasted. Wagner Alice Campbell wrote: > > You can think of the WDT as a sort of a warm boot mechanism. It is > designed to restart the processor, but without switching off the > power. A flag in the status register is set when it has been > triggered. When WDT is enabled, a builtin rc oscillator starts and > counts down to zero and reboots. To prevent a reboot, use CLRWDT > instruction before it can happen. Whether a watchdog timeout is a > Bad Thing depends on what you want to do. For example, you can do a > temperature compensation for a pic by measuring how long in > crystal-oscillator ticks it takes to trigger the WDT, then adjust a > timing loop so it remains constant as the RC oscillator changes with > temperature, since sleep uses the RC oscillator. > > it is tricky to learn, you need to experiment with loops that time > out on purpose to get a feel for it, and a way to reliably detect > whether the WDT occured or something else happened. > > alice > > > > Can somebody please explain what is the watch dog timer and its uses... > > thanks. > > regards > > > >