
CHAPTER 12 WATCHDOG TIMER
12-1
Figure 11-1 Watchdog timer jumper
CHAPTER SYNOPSIS
Uses for a watchdog timer
Cautions using watchdog
DESCRIPTION
WATCHDOG TIM ER CH APTE R 12
A watchdog timer is used to reset the RPC-2350 if the
program or CPU "crashes". When enabled, the program
must write to I/O address &E8 to avoid a reset. T he
timeout is adjustable for 150 ms, 600 ms, or 1.2
seconds.
The watchdog should be disabled when using INPUT
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 &E4,
bit 0 and disabled by writing a 0 to the same location.
The timer is reset by any access (read or write) to I/O
address &E8.
The AIN com mand, in conjunction w ith the SPI port,
access this address. Thus, executing either an AIN or
SPI function also resets the watchdog timer, if enabled.
The watchdog timer is part of a voltage monitor and
reset chip U14.
Watchdog time is determined by jumper W 1. Use the
following table to set a timeo ut.
W1 Pins Typical
timeout
Range
[1-2] 1.2 sec. 500 mS to 2 Sec.
no jumper 600 ms 250 mS to 1000 mS
2-3 150 ms 62.5 to 250 mS
WARNING:
Once the watchdog timer is enabled, it can only be
disabled by a BIT &E4,0,0 in the program . If the
watchdog timer is running and the program stops for
any reason (program error or < Esc> key hit), the
card will reset. You can recover the program by
typing UNNEW.
PROGRAM EXAMPLES
The following program fragments enable the watchdog
timer, reset it while the program is running, and then
disables it.
100 OUT &E4,1 :'Turn on watchdog
.
.
.
5000 OUT &E8,0 :'Reset timer
7000 A = AIN(N) :’Reset timer
.
.
.
10000 OUT &E4,0 :'Turn off watchdog
Komentáře k této Příručce