56 PCA-6145B/6145L User's Manual
Programming the watchdog timer
If you decide to program the watchdog timer, you must write a
program which reads I/O port address 443 (hex). The output data is
a timer value. You can write it from 01 (hex) to 3F (hex), and the
related timer is 1 sec. to 63 sec.
After date entry, your program must refresh the watchdog dimer by
rewriting the I/O port 443 (hex) while simultaneously setting it.
The following program is a program for the watchdog timer::
Step 1
out 443h, data REM Start and reset the
watchdog timer
Step 2
your application program task #1
Step 3
out 443h, date REM Reset the timer
Step 4
your application program task #2
Step 5
out 443h, data REM Reset the timer
. .
. .
Step n
in 43h
REM Disable watchdog function
Date values
01
1 sec.
0 2
2 sec.
0 3
3 sec.
0 4
4 sec.
.
.
.
.
.
.
.
.
3F
63 sec