XC886/888CLM
Timers
User’s Manual
13-18
V1.3, 2010-02
Timers, V 1.0
13.2.3
Capture Mode
In order to enter the 16-bit capture mode, bits CP/RL2 and EXEN2 in register T2CON
must be set. In this mode, the down count function must remain disabled. The timer
functions as a 16-bit timer and always counts up to FFFF
H
, after which, an overflow
condition occurs. Upon overflow, bit TF2 is set and the timer reloads its registers with
0000
H
. The setting of TF2 generates an interrupt request to the core.
Additionally, with a falling/rising edge (chosen by T2MOD.EDGESEL) on pin T2EX, the
contents of the timer register (THL2) are captured into the RC2 register. The external
input is sampled in every PCLK cycle. When a sampled input shows a low (high) level in
one PCLK cycle and a high (low) in the next PCLK cycle, a transition is recognized. If the
capture signal is detected while the counter is being incremented, the counter is first
incremented before the capture operation is performed. This ensures that the latest
value of the timer register is always captured.
If bit T2RHEN is set, Timer 2 is started by first falling edge/rising edge at pin T2EX, which
is defined by bit T2REGS. If bit EXEN2 is set, bit EXF2 is also set at the same point when
Timer 2 is started with the same falling edge/rising edge at pin T2EX, which is defined
by bit EDGESEL. The capture will happen with the following negative/positive transitions
at pin T2EX, which is defined by bit EDGESEL.
When the capture operation is completed, bit EXF2 is set and can be used to generate
an interrupt request.
describes the capture function of Timer 2.
*
Содержание XC886CLM
Страница 1: ...User s Manual V1 3 2010 02 Microcontrollers 8 Bit XC886 888CLM 8 Bit Single Chip Microcontroller...
Страница 3: ...User s Manual V1 3 2010 02 Microcontrollers 8 Bit XC886 888CLM 8 Bit Single Chip Microcontroller...
Страница 324: ...XC886 888CLM Serial Interfaces User s Manual 12 52 V1 3 2010 02 Serial Interfaces V 1 0...
Страница 663: ...w w w i n f i n e o n c o m Published by Infineon Technologies AG...