Alternating Output Mode - Philips P89LPC938 User Manual

Single-chip microcontroller
Table of Contents

Advertisement

Philips Semiconductors
When the timer changes direction at the bottom, in this example, it counts ...,0001H,
0000H, 0001H,... The CCU Timer overflow interrupt flag is set in the counter CCUCLK
cycle after the transition from 0001H to 0000H.
The status of the TDIR2 bit in TCR20 reflects the current counting direction. Writing to this
bit while operating in symmetrical mode has no effect.

10.7 Alternating output mode

In asymmetrical mode, the user can program PWM channels A/B and C/D as alternating
pairs for bridge drive control. By setting ALTAB or ALTCD bits in TCR20, the output of
these PWM channels are alternately gated on every counter cycle. This is shown in the
following figure:
Fig 24. Alternate output mode.
Table 52:
OCMx1
0
0
1
1
[1]
[2]
User manual
Output compare pin behavior.
[1]
[1]
OCMx0
Output Compare pin behavior
Basic timer mode
0
Output compare disabled. On power-on, this is the default state, and pins
are configured as inputs.
1
Set when compare in
operation. Cleared on
compare match.
0
invalid configuration
1
Toggles on compare
[2]
match
x = A, B, C, D
'ON' means in the CCUCLK cycle after the event takes place.
Rev. 03 — 7 June 2005
TOR2
COMPARE VALUE A (or C)
COMPARE VALUE B (or D)
0
PWM OUTPUT A (or C) (P2.6)
PWM OUTPUT B (or D) (P1.6)
002aaa895
Asymmetrical PWM
Non-Inverted PWM. Set
on compare match.
[2]
Cleared on CCU Timer
underflow.
Inverted PWM. Cleared
on compare match. Set
on CCU Timer
[2]
underflow.
© Koninklijke Philips Electronics N.V. 2005. All rights reserved.
UM10119
P89LPC938 User manual
TIMER VALUE
Symmetrical PWM
Non-Inverted PWM.
Cleared on compare
match, upcounting. Set
on compare match,
downcounting.
Inverted PWM. Set on
compare match,
upcounting. Cleared on
compare match,
[2]
downcounting.
60 of 139

Advertisement

Table of Contents
loading

Table of Contents