03.01.2015 Views

80C186EC/80C188EC Microprocessor User's Manual

80C186EC/80C188EC Microprocessor User's Manual

80C186EC/80C188EC Microprocessor User's Manual

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

WATCHDOG TIMER UNIT<br />

12.3 USING THE WATCHDOG TIMER AS A GENERAL-PURPOSE TIMER<br />

Systems that do not require a watchdog timer can program the Watchdog Timer Unit to function<br />

as a general-purpose timer. In reality, it is a lack of programming that allows the Watchdog Timer<br />

Unit to perform general-purpose timer tasks.<br />

Recall that write access to the WDT Reload Value is prohibited only after the LOCKed reload<br />

sequence is executed. If this sequence is not performed, then access to the WDT Reload Value is<br />

unrestrained. Systems that require a general-purpose timer simply never execute the LOCKed reload<br />

sequence, thus allowing reprogramming of the WDT Reload Register.<br />

Arbitrary duty cycle pulse trains can be generated by the Watchdog Timer when it is configured<br />

as a general-purpose timer. The WDTOUT signal is driven low for four CLKOUT cycles when<br />

the down counter reaches zero. The down counter is reloaded with the WDT Reload Value during<br />

the CLKOUT cycle immediately after the counter reaches zero. Figure 12-4 shows the WDTOUT<br />

signal waveforms when the Watchdog Timer is configured as a general-purpose timer.<br />

The WDTOUT signal can be used to generate interrupts like any of the timers (remember that it<br />

must be edge triggered). Because the WDT reloads itself (five cycles after time-out), it acts as a<br />

timer in continuous mode. Unlike the timers, however, the WDT count is decremented every<br />

clock cycle (rather than every four clock cycles, as with the timers). For this reason, when the<br />

WDT is used as a general-purpose timer, it can achieve a higher resolution than is possible with<br />

the timers.<br />

CLKOUT<br />

Four CLKOUT Cycles<br />

WDTOUT<br />

WDT COUNT<br />

1 0 N N-1 N-2 N-3 N-4<br />

A1305-0A<br />

Figure 12-4. WDTOUT Waveforms<br />

12.4 DISABLING THE WATCHDOG TIMER<br />

Systems that do not use the Watchdog Timer can disable the entire circuit during system initialization.<br />

When the Watchdog Timer is disabled, all clocks to the unit are shut off and the circuit<br />

consumes no power.<br />

12-6

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!