68 PCM-5890 User's Manual
Jumpers J23, J24, and J25 control the watchdog settings. The
default configuration of the timer is enabled with system reset.
To enable the watchdog timer, you must write a program which
reads I/O port address 443 (hex) at regular intervals. The first time
your program reads the port, it enables the watchdog timer. After
that, your program must read the port at time interval of less than
1.6 seconds, otherwise the watchdog timer will activate and reset
the CPU or generate an interrupt on IRQ15. When you want to
disable the watchdog timer, your program should read I/O port 043
(hex).
If CPU processing comes to a standstill because of EMI or a
software bug, your program's signals to I/O port address 443 to the
timer will be interrupted. The timer will then automatically reset the
CPU or invoke an IRQ, and data processing will continue normally.
You must write your program so that it reads I/O port address 443
at an interval shorter than the timer's preset interval. The timer's
intervals have a tolerance of ±30%, so you should program an
instruction that will refresh the timer about every second.
The following program shows how you might program the watch-
dog timer in BASIC:
1 0
REM Watchdog timer example program
2 0
X=INP (&H443) REM Enable and refresh the watch-
d o g
3 0
GOSUB 1000 REM Task #1, takes 1 second to com-
plete
4 0
X=INP (&H443) REM Refresh the watchdog
5 0
GOSUB 2000 REM Task #2, takes 1 second to com-
plete
6 0
X=INP (&H043) REM Disable the watchdog
7 0
E N D
1000
REM Subroutine #1, takes 1 second to complete
.
.
.
1070
RETURN
2000
REM Subroutine #2, takes 1 second to complete
.
.
.
2090
RETURN
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com