English
Language : 

C868_02 Datasheet, PDF (79/244 Pages) Infineon Technologies AG – 8 - Bit CMOS Microcontroller
C868
On-Chip Peripheral Components
4.7.1.3 Switching Rules
The compare actions take place in parallel for the three compare channels. Depending
on the count direction, the compare matches have different meanings. In order to get the
PWM information independent from the output levels, two different states have been
introduced for the compare actions: The active state and the passive state, which are
used to generate the desired PWM as a combination of the states delivered by T13, the
trap control unit and the multi-channel control unit. If the active state is interpreted as a
’1’ and the passive state as a ’0’, the state information is combined with a logical AND
function.
• active AND active = active
• active AND passive = passive
• passive AND passive = passive
The compare states change with the detected compare-matches and are indicated by
the CC6xST bits. The compare states of T12 are defined as follows:
• passive if the counter value is below the compare value
• active if the counter value is above the compare value
This leads to the following switching rules for the compare states:
• set to the active state when the counter value reaches the compare value while
counting up
• reset to the passive state when the counter value reaches the compare value while
counting down
• reset to the passive state in case of a zero-match without compare-match while
counting up
• set to the active state in case of a zero-match with a parallel compare-match while
counting up
compare-match
2
1
1
0
active
passive
T12clk
T12
2
compare
state
Figure 4-14 Compare States for Compare Value = 2
User’s Manual
4-35
V 0.4, 2002-01