Advantech PPC-100 Manual page 85

486-based panel pc with 10.4" lcd display
Table of Contents

Advertisement

Jumpers J22, J24, J26 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
watchdog timer in BASIC:
10
20
30
40
50
60
70
1000
.
.
.
1070
2000
.
.
.
2090
80
PPC-100 User's Manual
REM Watchdog timer example program
X=INP (&H443) REM Enable and refresh the watchdog
GOSUB 1000 REM Task #1, takes 1 second to complete
X=INP (&H443) REM Refresh the watchdog
GOSUB 2000 REM Task #2, takes 1 second to complete
X=INP (&H043) REM Disable the watchdog
END
REM Subroutine #1, takes 1 second to complete
RETURN
REM Subroutine #2, takes 1 second to complete
RETURN

Advertisement

Table of Contents
loading

Table of Contents