English
Language : 

MC68HC908QC16_07 Datasheet, PDF (207/274 Pages) Freescale Semiconductor, Inc – Microcontrollers
T2CLK
(IF AVAILABLE)
INTERNAL
BUS CLOCK
T2CLK
PRESCALER
TSTOP
TRST
16-BIT COUNTER
T2CNTH:T2CNTL
16-BIT COMPARATOR
T2MODH:T2MODL
CHANNEL 0
16-BIT COMPARATOR
T2CH0H:T2CH0L
16-BIT LATCH
CHANNEL 1
16-BIT COMPARATOR
T2CH1H:T2CH1L
16-BIT LATCH
PRESCALER SELECT
PS2
PS1
PS0
ELS0B ELS0A
CH0F
MS0A
MS0B
ELS1B ELS1A
MS1A
CH1F
Functional Description
TOF
INTERRUPT
TOIE
LOGIC
TOV0
CH0MAX
CH0IE
TOV1
CH1MAX
CH1IE
PORT
LOGIC
T2CH0
INTERRUPT
LOGIC
PORT
LOGIC
T2CH1
INTERRUPT
LOGIC
Figure 17-2. TIM2 Block Diagram
17.3.2 Input Capture
With the input capture function, the TIM2 can capture the time at which an external event occurs. When
an active edge occurs on the pin of an input capture channel, the TIM2 latches the contents of the counter
into the TIM2 channel registers, T2CHxH:T2CHxL. The polarity of the active edge is programmable. Input
captures can be enabled to generate interrupt requests.
17.3.3 Output Compare
With the output compare function, the TIM2 can generate a periodic pulse with a programmable polarity,
duration, and frequency. When the counter reaches the value in the registers of an output compare
channel, the TIM2 can set, clear, or toggle the channel pin. Output compares can be enabled to generate
interrupt requests.
17.3.3.1 Unbuffered Output Compare
Any output compare channel can generate unbuffered output compare pulses as described in 17.3.3
Output Compare. The pulses are unbuffered because changing the output compare value requires writing
the new value over the old value currently in the TIM2 channel registers.
MC68HC908QC16 • MC68HC908QC8 • MC68HC908QC4 Data Sheet, Rev. 3
Freescale Semiconductor
207