English
Language : 

MC908GR32AVFAE Datasheet, PDF (252/314 Pages) Freescale Semiconductor, Inc – Microcontrollers
Timer Interface Module (TIM2)
18.7 I/O Signals
Port D shares two of its pins with the TIM2. Port F shares four of its pins with the TIM2. PTD6/T2CH0 is
an external clock input to the TIM2 prescaler. The six TIM2 channel I/O pins are PTD6/T2CH0,
PTD7/T2CH1, PTF4/T2CH2, PTF5/T2CH3, PTF6/T2CH4, and PTF7/T2CH5.
18.7.1 TIM2 Clock Pin (T2CH0)
T2CH0 is an external clock input that can be the clock source for the TIM2 counter instead of the
prescaled internal bus clock. Select the T2CH0 input by writing 1s to the three prescaler select bits,
PS[2:0]. (See 18.8.1 TIM2 Status and Control Register.) The minimum TCLK pulse width is specified in
20.14 Timer Interface Module Characteristics. The maximum TCLK frequency is the least: 4 MHz or bus
frequency ÷ 2.
When the PTD6/T2CH0 pin is the TIM2 clock input, it is an input regardless of the state of the DDRD6 bit
in data direction register D.
18.7.2 TIM2 Channel I/O Pins (T2CH5:T2CH2 and T2CH1:T2CH0)
Each channel I/O pin is programmable independently as an input capture pin or an output compare pin.
T2CH0, T2CH2, and T2CH4 can be configured as buffered output compare or buffered PWM pins.
18.8 I/O Registers
These I/O registers control and monitor TIM2 operation:
• TIM2 status and control register (T2SC)
• TIM2 counter registers (T2CNTH:T2CNTL)
• TIM2 counter modulo registers (T2MODH:T2MODL)
• TIM2 channel status and control registers (T2SC0, T2SC1, T2SC2, T2SC3, T2SC4, and T2SC5)
• TIM2 channel registers (T2CH0H:T2CH0L, T2CH1H:T2CH1L, T2CH2H:T2CH2L,
T2CH3H:T2CH3L, T2CH4H:T2CH4L, and T2CH5H:T2CH5L)
18.8.1 TIM2 Status and Control Register
The TIM2 status and control register:
• Enables TIM2 overflow interrupts
• Flags TIM2 overflows
• Stops the TIM2 counter
• Resets the TIM2 counter
• Prescales the TIM2 counter clock
Address: $002B
Bit 7
6
5
4
3
Read: TOF
0
0
TOIE TSTOP
Write: 0
TRST
2
1
Bit 0
PS2
PS1
PS0
Reset: 0
0
1
0
0
0
0
0
= Unimplemented
Figure 18-5. TIM2 Status and Control Register (T2SC)
MC68HC908GR60A • MC68HC908GR48A • MC68HC908GR32A Data Sheet, Rev. 5
252
Freescale Semiconductor