SBC comm SBC-350A Computer Hardware User Manual


 
38 SBC-350A User's Manual
Introduction
To utilize the watchdog timer, you must write a program which
writes to I/O port address 443 (hex) at regular intervals. The first
time your program writes to the port, it enables the watchdog timer
and sets the time-out interval. After that your program must write
to the port at time intervals less than the time-out interval, other-
wise the watchdog timer will activate and reset the CPU. When you
want to disable the watchdog timer, your program should write 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 and data processing will continue normally.
Programming
You must write your program so that it write to I/O port address
443 at an interval shorter than the timer’s preset interval. The
timer’s interval has a tolerance of ±5%, so you should program an
instruction that will refresh the timer before a time-out occurs. The
following steps illustrate how you might program the watchdog
timer.
Step1 Write to I/O port 443 (Hex) and designate a time-out
interval. This will enable the watchdog and set-up it's
time-out interval
Step2 Write to I/O port 043 (Hex) and any random value. This
will in turn disable the watchdog timer.
The watchdog's time-out interval can be set at 15 levels between 2
and 30 seconds. The following table shows the Hex values for the
appropriate time-out intervals: