8XC196MC, MD, MH USER’S MANUAL

 

T2CONTROL.2:0

 

 

 

 

3

 

 

 

 

 

 

Timer 2

 

FXTAL1/4

Prescaler

 

 

 

Module

 

 

 

 

 

Clock

 

 

 

 

 

Timer 1 Overflow/Underflow

 

Overflow/

 

 

Underflow

 

 

 

 

 

T2CONTROL.6

 

 

TIMER2

 

 

 

 

 

 

 

 

Direction

OVRTM

 

 

 

Interrupt

 

 

 

 

 

 

 

T1CONTROL.2:0

 

 

 

3

 

 

FXTAL1/4

 

 

Timer 1

 

 

Prescaler

 

 

 

 

 

 

 

 

Module

Clock

 

T1CLK

 

 

 

 

 

 

 

 

 

 

Overflow/

 

 

 

 

Underflow

 

 

 

Quadrature Count

 

T1DIR

 

 

TIMER1

T1RELOAD

 

 

 

 

T1CONTROL.6

 

 

Direction

 

Quadrature Direction

 

 

 

 

 

 

 

 

A3131-01

 

Figure 11-2. EPA Timer/Counters

 

The timer/counters can be used as time bases for input captures, output compares, and pro- grammed interrupts (software timers). When a counter increments from FFFEH to FFFFH or dec- rements from 0001H to 0000H, the counter-overflow/underflow interrupt pending bit is set. This bit can optionally cause an interrupt. The clock source, direction-control source, count direction, and resolution of the input capture or output compare are all programmable (see “Programming the Timers” on page 11-15). The maximum count rate is one-half the internal clock rate, or

FXTAL1/4 (see “Internal Timing” on page 2-7). This provides a minimum resolution for an input capture or output compare of 250 ns (at 16 MHz).

 

 

4 × prescaler_divisor

resolution

=

----------------------------------------------------------

 

 

FXTAL1

11-6

Page 245
Image 245
Intel 8XC196MC, 8XC196MD, 8XC196MH manual EPA Timer/Counters