User`s manual

PCA-6145 User’s Manual 54
Appendix A Programming the Watchdog
Timer
A.1 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 timer by
rewriting the I/O port 443 (hex) while simultaneously setting it.
The following program is a program for the watchdog timer:
Step 1out 443h, data REM Start and reset the
watchdog timer
Step 2your application program task #1
Step 3out 443h, date REM Reset the timer
Step 4your application program task #2
Step 5out 443h, data REM Reset the timer
Step nin 43hREM Disable watchdog function
Date values
01 1 sec.
02 2 sec.
03 3 sec.
04 4 sec.
..
3F 63 sec