Watch dog timer changing time out, HELP WANTED!!!

Hey Guys,

I would really appreciate if anyone can assist me in writing a code that will change the timeout value of the watchdog timer.
I am very much new to the world of Arduino. I would like to know the steps that you need to setup the timeout value of the watchdog, the header files that needs to be specified and so on.
I tried looking for a proper documentation on watch dog timer but couldn't find one.

Thanks!

I've never used the watchdog timer, but I do know that you'd get more help if you explained what you are planning to do that involves the watchdog timer.

Have a look at section 10.9.2 of the Mega328 data sheet.

Basically you just write a value into the WDTCSR register, something like

WDTCSR |= (1<<WDP0) | (1<<WDP1) | (1<<WDP2);

will give you 1 second.

The minimum is ~16mS, max is ~8 seconds.


Rob