Thanks DT - yr a genius, the first thing i did worked so didn't try the others. Why did it need that pause for it to work - i would have thought it would have just cycled around in the loop
Thanks DT - yr a genius, the first thing i did worked so didn't try the others. Why did it need that pause for it to work - i would have thought it would have just cycled around in the loop
Well that's unfortunate.
Trying the other 2, may have answered your question.
It does "just cycled around in the loop".Why did it need that pause for it to work - i would have thought it would have just cycled around in the loop
But, there's nothing in there to clear the WatchDogTimer. And without it, the processor will reset every ~18ms.
Timer0 was set up with 1:256 prescaler, so it would interrupt after 65.536 ms had passed. But it never made it that far.
PAUSE, automatically clears the WDT every so often, so that caused it to work.
The second example just clears the WDT by using the ASM statement CLRWDT.
And the third example turns the WDT OFF so that it doesn't need to be cleared.
Any one of the three examples should have made it work.
<br>
DT
Just after I turned the wdt off and got rid of the pause 1 and it worked also, detailed knowlegde certainly helps with these things doesn't it
Cheers for your help
Bookmarks