MCMC68HC05L16 Freescale Semiconductor, Inc, MCMC68HC05L16 Datasheet - Page 85

no-image

MCMC68HC05L16

Manufacturer Part Number
MCMC68HC05L16
Description
M68hc05 Microcontrollers
Manufacturer
Freescale Semiconductor, Inc
Datasheet
The CLK2 from the prescaler or the EXTCLK from the EVI block is selected as timer clock by the T2CLK
bit in the TCR2 register. The CLK2 and the EXCLK are synchronized to the falling edge of system clock
in the prescaler and the EVI blocks. The minimum pulse width of CLK2 is the same as the system clock,
and the minimum pulse width of EXCLK (event mode) is one PH2 cycle. When the EXCLK (event mode)
is selected, 50% duty is not guaranteed.
The counter is incremented by the falling edge of the timer clock and the period between two falling edges
is defined as one timer cycle in the following description.
The compare register (OC2) is provided for comparison with the timer counter 2 (TCNT2). The OC2 data
is transferred to the buffer register when the counter is preset by a CPU write or by a compare output
(CMP2). This buffer register is compared with the timer counter 2 (TCNT2).
The comparison between the counter and the OC2 buffer register is done when the system clock is high
in each bus cycle. If the counter matches with the OC2 buffer register, the comparator latches this result
during the current timer cycle. When the next timer cycle begins, the comparator outputs CMP2 signal (if
the compare match is detected during previous timer cycle). This CMP2 is used in the counter preset data
transfer to the buffer register, setting OC2F in the TSR2 and the EVO block. The counter preset overrides
the counter increment.
The OC2F bit may generate interrupt requests if the OC2IE bit in the TCR2 is set.
9.3.1 Timer Control Register 2
TI2IE — Timer Input 2 Interrupt Enable
OC2IE — Compare 2 Interrupt Enable
Bit 5 — Reserved
T2CLK — Timer 2 Clock Select
Freescale Semiconductor
The TI2IE bit enables timer input 2 (EVI) interrupt when TI2F is set. This bit is cleared on reset.
The OC2IE bit enables compare 2 (CMP2) interrupt when compare match is detected (OC2F is set).
This bit is cleared on reset.
This bit is not used and is always read as logic 0.
The T2CLK bit selects the clock source for the timer counter 2. This bit is cleared on reset.
0 = Timer input 2 interrupt disabled
1 = Timer input 2 interrupt enabled
0 = Timer input 2 interrupt disabled
1 = Timer input 2 interrupt enabled
0 = CLK2 from prescaler selected
1 = EXCLK from EVI input block selected
Address:
Reset:
Read:
Write:
$001C
TI2IE
BIt 7
0
Figure 9-8. Timer Control Register 2 (TCR2)
MC68HC05L16 • MC68HC705L16 Data Sheet, Rev. 4.1
OC2IE
6
0
5
0
0
T2CLK
4
0
IM2
3
0
IL2
2
0
OE2
1
0
Bit 0
OL2
0
Timer 2
85

Related parts for MCMC68HC05L16