Watchdog Timer on Mega8
2006-06-18 by kernels_nz
Hi guys, Im using a Mega8 at the moment and cant quite understand whats happening with my watchdog timer. I have never used the watchdog timer before, but have had quite a bit of general programming experience. Basically, I do as the datasheet says, I write a one to WDCE and WDE simultaneously, then in the next instruction write 0x0F to WDTCR (2048k prescaler, WDE = 1) But, when I try to disable the watchdog by doing the same as above, except writing 0x00 to WDTCR, the processor resets, like a watchdog reset. I disable it will within the 2seconds I should have before it expires. Has anyone else had issues with the watchdog timer ? By the way, im using an 8Mhz internal oscillator, Watchdog enable fuse not blown, so it should be under software control. Would greatly appreciate any help !! Cheers Hein B Auckland, New Zealand.