Using The Watchdog Timer As A General-Purpose Timer - Intel 80C188EC User Manual

Hide thumbs Also See for 80C188EC:
Table of Contents

Advertisement

WATCHDOG TIMER UNIT

12.3 USING THE WATCHDOG TIMER AS A GENERAL-PURPOSE TIMER

Systems that do not require a watchdog timer can program the Watchdog Timer Unit to function
as a general-purpose timer. In reality, it is a lack of programming that allows the Watchdog Timer
Unit to perform general-purpose timer tasks.
Recall that write access to the WDT Reload Value is prohibited only after the LOCKed reload
sequence is executed. If this sequence is not performed, then access to the WDT Reload Value is
unrestrained. Systems that require a general-purpose timer simply never execute the LOCKed re-
load sequence, thus allowing reprogramming of the WDT Reload Register.
Arbitrary duty cycle pulse trains can be generated by the Watchdog Timer when it is configured
as a general-purpose timer. The WDTOUT signal is driven low for four CLKOUT cycles when
the down counter reaches zero. The down counter is reloaded with the WDT Reload Value during
the CLKOUT cycle immediately after the counter reaches zero. Figure 12-4 shows the WDTOUT
signal waveforms when the Watchdog Timer is configured as a general-purpose timer.
The WDTOUT signal can be used to generate interrupts like any of the timers (remember that it
must be edge triggered). Because the WDT reloads itself (five cycles after time-out), it acts as a
timer in continuous mode. Unlike the timers, however, the WDT count is decremented every
clock cycle (rather than every four clock cycles, as with the timers). For this reason, when the
WDT is used as a general-purpose timer, it can achieve a higher resolution than is possible with
the timers.
Four CLKOUT Cycles
CLKOUT
WDTOUT
WDT COUNT
1
0
N
N-1
N-2
N-3
N-4
A1305-0A
Figure 12-4. WDTOUT Waveforms
12.4 DISABLING THE WATCHDOG TIMER
Systems that do not use the Watchdog Timer can disable the entire circuit during system initial-
ization. When the Watchdog Timer is disabled, all clocks to the unit are shut off and the circuit
consumes no power.
12-6

Advertisement

Table of Contents
loading

This manual is also suitable for:

80c186ec

Table of Contents