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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

TIMER/COUNTER UNIT<br />

Timer 0<br />

Serviced<br />

1<br />

Internal Count Value<br />

Maxcount - 1 0<br />

TxOUT Pin<br />

NOTE: 1. T CLOV1<br />

A1301-0A<br />

Figure 9-9. TxOUT Signal Timing<br />

In dual maximum count mode, the timer output pin indicates which Maxcount Compare register<br />

is currently in use. A low output indicates Maxcount Compare B, and a high output indicates<br />

Maxcount Compare A (see Figure 9-4 on page 9-6). If programmed to run continuously, a repetitive<br />

waveform can be generated. For example, if Maxcount Compare A contains 10, Maxcount<br />

Compare B contains 20, and CLKOUT is 12.5 MHz, the timer generates a 33 percent duty cycle<br />

waveform at 104 KHz. The output pin always goes high at the end of the counting sequence (even<br />

if the timer is not programmed to run continuously).<br />

9.2.5 Enabling/Disabling Counters<br />

Each timer has an Enable (EN) bit in its Control register to allow or prevent timer counting. The<br />

Inhibit (INH) bit controls write accesses to the EN bit. Timers 0 and 1 can be programmed to use<br />

their input pins as enable functions also. If a timer is disabled, the count register does not increment<br />

when the counter element services the timer.<br />

The Enable bit can be altered by programming or the timers can be programmed to disable themselves<br />

at the end of a counting sequence with the Continuous (CONT) bit. If the timer is not programmed<br />

for continuous operation, the Enable bit automatically clears at the end of a counting<br />

sequence. In single maximum count mode, this occurs after Maxcount Compare A is reached. In<br />

dual maximum count mode, this occurs after Maxcount Compare B is reached (Timers 0 and 1<br />

only).<br />

9-15

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

Saved successfully!

Ooh no, something went wrong!