
Timer Interface Module (TIM)
MC68HC08KH12A Data Sheet, Rev. 1.1
118
Freescale Semiconductor
To allow software to clear status bits during a break interrupt, write a logic one to the BCFE bit. If a status
bit is cleared during the break state, it remains cleared when the MCU exits the break state.
To protect status bits during the break state, write a logic zero to the BCFE bit. With BCFE at logic zero
(its default state), software can read and write I/O registers during the break state without affecting status
bits. Some status bits have a two-step read/write clearing procedure. If software does the first step on
such a bit before the break, the bit cannot change during the break state as long as BCFE is at logic zero.
After the break, doing the second step clears the status bit.
11.8 I/O Signals
Port E shares three of its pins with the TIM. PTE0/TCLK is and external clock input to the TIM prescaler.
The two TIM channel I/O pins are PTE1/TCH0 and PTE2/TCH1.
11.8.1 TIM Clock Pin (PTE0/TCLK)
PTE0/TCLK is an external clock input that can be the clock source for the TIM counter instead of the
prescaled internal bus clock. Select the PTE0/TCLK input by writing logic ones to the three prescaler
select bits, PS[2:0]. (See
11.9.1 TIM Status and Control Register (TSC)
.) The minimum TCLK pulse width,
TCLK
LMIN
or TCLK
HMIN
, is:
bus frequency
The maximum TCLK frequency is:
bus frequency
÷
2
PTE0/TCLK is available as a general-purpose I/O pin when not used as the TIM clock input. When the
PTE0/TCLK pin is the TIM clock input, it is an input regardless of the state of the DDRE0 bit in data
direction register E.
11.8.2 TIM Channel I/O Pins (PTE1/TCH0:PTE2/TCH1)
Each channel I/O pin is programmable independently as an input capture pin or an output compare pin.
PTE1/TCH0 can be configured as buffered output compare or buffered PWM pins.
11.9 I/O Registers
The following I/O registers control and monitor operation of the TIM:
TIM status and control register (TSC)
TIM counter registers (TCNTH:TCNTL)
TIM counter modulo registers (TMODH:TMODL)
TIM channel status and control registers (TSC0 and TSC1)
TIM channel registers (TCH0H:TCH0L and TCH1H:TCH1L)
-----------------1
tSU
+