English
Language : 

MC68HC08GP32A Datasheet, PDF (205/258 Pages) Freescale Semiconductor, Inc – Microcontrollers
Functional Description
18.4 Functional Description
Figure 18-2 shows the structure of the TIM. The central component of the TIM is the 16-bit TIM counter
that can operate as a free-running counter or a modulo up-counter. The TIM counter provides the timing
reference for the input capture and output compare functions. The TIM counter modulo registers,
TMODH:TMODL, control the modulo value of the TIM counter. Software can read the TIM counter value
at any time without affecting the counting sequence.
The two TIM channels (per timer) are programmable independently as input capture or output compare
channels. If a channel is configured as input capture, then an internal pullup device may be enabled for
that channel. See 12.5.3 Port D Input Pullup Enable Register.
Figure 18-3 summarizes the timer registers.
NOTE
References to either timer 1 or timer 2 may be made in the following text by
omitting the timer number. For example, TSC may generically refer to both
T1SC and T2SC.
INTERNAL
BUS CLOCK
TSTOP
TRST
PRESCALER
PRESCALER SELECT
PS2
PS1
PS0
16-BIT COUNTER
16-BIT COMPARATOR
TMODH:TMODL
CHANNEL 0
16-BIT COMPARATOR
TCH0H:TCH0L
16-BIT LATCH
CHANNEL 1
16-BIT COMPARATOR
TCH1H:TCH1L
16-BIT LATCH
ELS0B ELS0A
CH0F
MS0A
MS0B
ELS1B ELS1A
MS1A
CH1F
TOF
TOIE
TOV0
CH0MAX
CH0IE
TOV1
CH1MAX
CH1IE
Figure 18-2. TIM Block Diagram
INTERRUPT
LOGIC
PORT
LOGIC
T[1,2]CH0
INTERRUPT
LOGIC
PORT
LOGIC
T[1,2]CH1
INTERRUPT
LOGIC
MC68HC08GP32A • MC68HC08GP16A Data Sheet, Rev. 1.0
Freescale Semiconductor
205