FabIATech Corporation
41
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 6 seconds.
#include “stdio.H”
#include “WDLIB.H”
main( )
{
char WD_TIME=ox6;
InitWD(equWdUnitS);
printf (“Enable watchdog”);
//Trigger watchdog Timer Output is 6 seconds
EnWD(WD_TIME);
}
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 “WDLIB.H”
main( )
{
char WD_TIME=ox6;
InitWD(equWdUnitS);
printf (“Enable watchdog”);
//Trigger watchdog Timer Output is 6 seconds
EnWD(WD_TIME);
}
Содержание FX5401
Страница 5: ...v ...
Страница 8: ...FabIATech Corporation 3 Layout 18 30V 2 1 1 2 18 30V 1 1 2 2 ...
Страница 11: ...FabIATech Corporation 6 ...
Страница 19: ...FabIATech Corporation 14 ...
Страница 41: ...FabIATech Corporation 36 ...
Страница 51: ...FabIATech Corporation 46 ...
Страница 52: ...FabIATech Corporation 47 Appendix Dimension 200 44 2 130 70 26 48 70 8 17 R4 5 R2 3 6 ...