The following program shows how you might program the
watchdog timer in BASIC:
10
REM
20
X=Out &H443, 1 REM
watchdog
30
GOSUB 1000 REM
complete
40
X=Out &H443, 1 REM
50
GOSUB 2000 REM
complete
60
X=Out &H443, 0 REM
70
END
1000
REM
complete
.
.
.
1070
RETURN
2000
REM
complete
.
.
.
2090
RETURN
Watchdog timer example program
Task #1, takes 1 second to
Task #2, takes 1 second to
Subroutine #1, takes 1 second to
Subroutine #2, takes 1 second to
Appendix E Programming the Watchdog Timer
Enable and refresh the
Refresh the watchdog
Disable the watchdog
109