B.1 Watchdog timer programming example
The watchdog timer built in the
The following example program in assembly language gives hint to utilize the watchdog timer under operating systems such as DOS, Windows 9x/NT, etc.
Step 1: activate the watchdog timer
mov dx, 404Ch
in | al, dx |
|
and | al, NOT 80h | ; GPO7 to low |
out | dx, al |
|
Step 2: clear the watchdog timer |
| |
mov | dx, 404Ch |
|
in | al, dx |
|
or | al, 80h | ; GPO7 to high |
out dx, al
Step 3:
If the timer will not count the GP07 is kept high. To
mov | dx, 404Ch |
| |
in | al, dx |
| |
and | al, | NOT 80h | ; GPO7 to low |
out | dx, | al |
|
Notice: | the utility to enable/disable the watchdog timer under |
| Windows CE is built in the Advantech Windows CE |
| for |
5 4