|
XC878CLM Datasheet, PDF (101/139 Pages) Infineon Technologies AG – 8-Bit Single-Chip Microcontroller | |||
|
◁ |
XC878CLM
Advance Information
Functional Description
3.18
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, see Table 33. 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 33 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
94
V0.1, 2008-04
|
▷ |