~ Page 24 ~
The factor of the watchdog timer time-out constant is approximately 1 MINUTES. The period for the watchdog
timer time-out is between 1 to FF timer factors.
If you want to reset your system when watchdog times out, the following table listed the relation of timer
factors between time-out period. The formula of Time-Out Period is 30+60x(Time Factor -1). For example, if
the time factor is 10. The Time-out period is calculated as 30+60x(10-1)= 570.
Time Factor
Time-out Period (Seconds)
1
30
2
90
3
150
4
210
5
270
“
“
“
“
“
“
FF
“
Time out setting
3-3-2. Watchdog Timer Enabled
To enable the watchdog timer, you have to output a byte of timer factor to the watchdog. The following is a
Turbo C++ program, which demonstrates how to enable the watchdog timer and set the time-out period at 24
seconds.
#Include “ stdio. H”
#include “WATCHDOG.H”
main( )
{
char WD_TIME=oxo1;
printf (“ Enable watchdog” );
//Set watchdog Timer Output is 30 seconds
_enable_wd (WD_TIME);
}
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 which demonstrates how to trigger the
watchdog timer:
#include “ stdio.H”
#include “WATCHDOG.H”
main( )
{
char WD_TIME=oxo1;
printf (“ Trigger watchdog” );
//Set watchdog Timer Output is 30 seconds
_enable_wd(WD_TIME);
}
Summary of Contents for AR-B1682
Page 2: ... Page ii ...
Page 4: ... Page iv ...
Page 15: ... Page 9 DC00H OFF ON OFF E000H OFF OFF ON DISABLE OFF OFF OFF ...
Page 21: ... Page 15 ...
Page 32: ... Page 26 ...
Page 34: ... Page 28 ...
Page 53: ... Page 47 ...
Page 59: ... Page 53 ...