Curtis AR-B1682 operation manual Watchdog Timer Enabled

Models: AR-B1682

1 61
Download 61 pages 41.43 Kb
Page 30
Image 30

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);

}

~ Page 24 ~

Page 30
Image 30
Curtis AR-B1682 operation manual Watchdog Timer Enabled