The following example shows how you might program the
watchdog timer in BASIC:
10
REM Watchdog timer example program
20
OUT &H443, data
watchdog
30
GOSUB 1000
40
OUT &H443, data
50
GOSUB 2000
60
OUT &H443, data
70
X=INP (&H443)
timer
80
END
1000
REM
.
.
.
1070
RETURN
2000
REM
.
.
.
2090
RETURN
REM Start and restart the
REM Your application task #1
REM Reset the timer
REM Your application task #2
REM Reset the timer
REM Disable the watchdog
Subroutine #1, your application task
Subroutine #2, your application task
Appendix A Programming the Watchdog Timer
103