Specifications
~ Page 25 ~
3-3-3. Watchdog Timer Trigger
After you enable the watchdog timer, your program must write the same factor as enabling to the watchdog
register at least once every time-out period to its previous setting. You can change the time-out period by
writing another timer factor to the watchdog register at any time, and you must trigger the watchdog before
the new time-out period in the next trigger. Below is a Turbo C++ program that demonstrates how to trigger
the watchdog timer:
#include “studio.h”
#include “watchdog.h”
main( )
{
char WD_TIME=0x01;
prints (“Trigger watchdog”);
//Set watchdog Timer Output is 30 seconds
_enable_wd(WD_TIME);
}
3-3-4. Watchdog Timer Disabled
To disable the watchdog timer, simply write a 00H to the watchdog register.
#include “studio.h”
#include “watchdog.h”
main ( )
{
prints (“Disable Watch Dog”);
_Disable_WD( );
}