English
Language : 

XC164-16 Datasheet, PDF (118/417 Pages) Infineon Technologies AG – 16-Bit Single-Chip Microcontroller with C166SV2 Core Volume 2 (of 2): Peripheral Units
XC164-16 Derivatives
Peripheral Units (Vol. 2 of 2)
Capture/Compare Units
17.4
Capture Mode Operation
In Capture Mode, the current contents of a CAPCOM timer are latched (captured) into
the respective capture/compare register in response to an external event. This is used,
for example, to record the time at which an external event has occurred, or to measure
the distance between two external events in timer increments.
The event to cause a capture of a timer’s contents can be programmed to be either the
positive, the negative, or both the positive and the negative transition of the external
signal connected to the input pin. This triggering transition is selected by bitfield MODy
in the respective mode control register. When the selected external signal transition
occurs, the selected timer’s contents is latched into the capture/compare register and the
respective interrupt request line CCyIRQ is activated. This can cause an interrupt or PEC
service request, when enabled.
Note: A capture input can be used as an additional external interrupt input. The capture
operation can be disregarded in this case.
Either the contents of timer T0/T7 or T1/T8 can be captured, selected by the timer
allocation control bit ACCy in the respective mode control register.
Input
Clock
Timer T0/T7
Timer T1/T8
Interrupt
Requests
ACCy
CCyIO
Edge
Select
MODy
Capture
Register CCy
CCyIRQ
MCB05420
Figure 17-4 Capture Mode Block Diagram
For capture operation, the respective pin must be programmed for input. To ensure that
a transition of the input signal is recognized correctly, its level must be held high or low
for a minimum number of module clock cycles before it changes. This information can
be found in Section 17.10.
User’s Manual
CC12_X41, V2.1
17-13
V2.1, 2004-03