PCM-3341Userís Manual 58Appendix A Programming the WatchdogTimerA.1 Programming the watchdog timerThe default configuration of the timer is enabled with system reset.To enable the watchdog timer, you must make a program which writes 1to I/O port address 443 (hex) at regular intervals. The first time your pro-gram reads the port, it enables the watchdog timer. After that, your pro-gram must write 1 to port 443 at time intervals of less than 1.6 seconds.Otherwise, the watchdog timer will activate and reset the CPU. When youwant to disable the watchdog timer, your program should write 0 to port443.If CPU processing comes to a standstill because of EMI or a softwareproblem, your program's signals to I/O port address 443 of the timer willbe interrupted. The timer will then automatically reset the CPU, and dataprocessing will continue normally.You must make your program so that it writes 1 to I/O port 443 at aninterval shorter than the timer's preset interval. The timer's intervals havea tolerance of ± 30%, so you should program an instruction that willrefresh the timer about every second.The following example shows how you might program the watchdogtimer in BASIC:10 REM Watchdog timer example program20 X=Out &H443,1 REM Enable and refresh the watchdog30 GOSUB 1000 REM Task #1, takes 1 second to complete40 X=Out &H443,1 REM Refresh the watchdog50 GOSUB 2000 REM Task #2, takes 1 second to complete60 X=Out &H443,0 REM Disable the watchdog70 END1000 REM Subroutine #1, takes 1 second to complete...