Watchdog timer chapter 11 – Remote Processing RPC-30 User Manual
Page 34

WATCHDOG TIMER
CHAPTER 11
Page 32
RPC-30
Figure 11-1 External reset
DESCRIPTION
The watchdog timer is used to reset the RPC -30 if the
program or C PU "cr ashes". When enabled, the program
must write and data to I/O address 96 at least once every
1.2 seconds to avoid a reset. T he timeout is not
adjustable.
The watchdog should be disabled when using INPUT and
DEL AY statements. Also, loops which do not end
quickly or are of indeterminate duration should be
avoided unless a timer reset pulse is included. An
example of an indeterminate loop is one that waits for a
port condition to change.
The watchdog is enabled by writing a 1 to address 16,
bit 1 and disabled by writing a 0 to the same location
(use the BIT statement to do this). The timer is reset by
a write of any data to I/O address 0.
The watchdog timer is part of a voltage monitor, battery
backup controller, and r eset chip U6.
PROGRAM EXAMPLES
The following program fragments enable the watchdog
timer, reset it while the program is running, and then
disables it.
100 BIT 16,1, 1 :' Turn on watchdog
.
.
.
5000 OUT 96, 0 :' Reset timer
.
.
.
10000 BIT 16,1, 0 :' Turn off watchdog
EXTERNAL RESET
The RP C-30 m ay be re set by an exter nal switch via
jumper W1. Short terminals 1 to 2 to cause a reset. If
the reset line is excessively lon g or in an e lectrically
noisy environment, connect a 1K pull-up resistor to W1-
1. T his will prevent err oneous resets.