English
Language : 

MC68HC908AS32A Datasheet, PDF (227/280 Pages) Freescale Semiconductor, Inc – Microcontrollers
Chapter 17
Timer Interface Module (TIM)
17.1 Introduction
This section describes the timer interface module (TIM). The TIM is a 6-channel timer that provides a
timing reference with input capture, output compare, and pulse-width-modulation functions. Figure 17-2
is a block diagram of the TIM.
For further information regarding timers on M68HC08 Family devices, please consult the HC08 Timer
Reference Manual, (Freescale document order number TIM08RM/AD).
17.2 Features
Features include:
• Six input capture/output compare channels
– Rising-edge, falling-edge or any-edge input capture trigger
– Set, clear, or toggle output compare action
• Buffered and unbuffered pulse width modulation (PWM) signal generation
• Programmable TIM clock input
– Seven frequency internal bus clock prescaler selection
– External TIM clock input (4 MHz maximum frequency)
• Free-running or modulo up-count operation
• Toggle any channel pin on overflow
• TIM counter stop and reset bits
17.3 Functional Description
Figure 17-2 shows the TIM structure. 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 six TIM channels are programmable independently as input capture or output compare channels.
17.3.1 TIM Counter Prescaler
The TIM clock source can be one of the seven prescaler outputs or the TIM clock pin,
PTD6/ATD14/TCLK. The prescaler generates seven clock rates from the internal bus clock. The
prescaler select bits, PS[2:0], in the TIM status and control register select the TIM clock source.
MC68HC908AS32A Data Sheet, Rev. 2.0
Freescale Semiconductor
227