English
Language : 

MC68HC08GZ32 Datasheet, PDF (268/320 Pages) Freescale Semiconductor, Inc – Microcontrollers
Timer Interface Module (TIM2)
19.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.
19.7.1 TIM2 Clock Pin (PTD6/T2CH0)
PTD6/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 PTD6/T2CH0 input by writing 1s to the three prescaler select bits,
PS[2:0]. (See 19.8.1 TIM2 Status and Control Register.) The minimum TCLK pulse width is specified in
21.14 Timer Interface Module Characteristics. The maximum TCLK frequency is the least: 4 MHz or bus
frequency ÷ 2.
When the PTD6/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.
19.7.2 TIM2 Channel I/O Pins (PTF7/T2CH5:PTF4/T2CH2 and PTD7/T2CH1:PTD6/T2CH0)
Each channel I/O pin is programmable independently as an input capture pin or an output compare pin.
PTD6/T2CH0, PTF4/T2CH2, and PTF6/T2CH4 can be configured as buffered output compare or buffered
PWM pins.
19.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)
19.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
Reset: 0
0
1
0
0
= Unimplemented
2
1
Bit 0
PS2
PS1
PS0
0
0
0
Figure 19-5. TIM2 Status and Control Register (T2SC)
MC68HC08GZ32 Data Sheet, Rev. 3
268
Freescale Semiconductor