English
Language : 

XC886 Datasheet, PDF (88/119 Pages) Infineon Technologies AG – 8-Bit Single-Chip Microcontroller
XC886/888CLM
Functional Description
3.16
Timer 2 and Timer 21
Timer 2 and Timer 21 are 16-bit general purpose timers (THL2) that are fully compatible
and have two modes of operation, a 16-bit auto-reload mode and a 16-bit one channel
capture mode. As a timer, the timers count with an input clock of PCLK/12 (if prescaler
is disabled). As a counter, they count 1-to-0 transitions on pin T2. In the counter mode,
the maximum resolution for the count is PCLK/24 (if prescaler is disabled).
Table 32 Timer 2 Modes
Mode
Description
Auto-reload Up/Down Count Disabled
• Count up only
• Start counting from 16-bit reload value, overflow at FFFFH
• Reload event configurable for trigger by overflow condition only, or by
negative/positive edge at input pin T2EX as well
• Programmble reload value in register RC2
• Interrupt is generated with reload event
Channel
capture
Up/Down Count Enabled
• Count up or down, direction determined by level at input pin T2EX
• No interrupt is generated
• Count up
– Start counting from 16-bit reload value, overflow at FFFFH
– Reload event triggered by overflow condition
– Programmble reload value in register RC2
• Count down
– Start counting from FFFFH, underflow at value defined in register
RC2
– Reload event triggered by underflow condition
– Reload value fixed at FFFFH
• Count up only
• Start counting from 0000H, overflow at FFFFH
• Reload event triggered by overflow condition
• Reload value fixed at 0000H
• Capture event triggered by falling/rising edge at pin T2EX
• Captured timer value stored in register RC2
• Interrupt is generated with reload or capture event
Data Sheet
Prelimary
84
V0.1, 2006-02