English
Language : 

PIC18F23K22 Datasheet, PDF (198/492 Pages) Microchip Technology – 28/40/44-Pin, Low-Power, High-Performance Microcontrollers with nanoWatt XLP Technology
PIC18(L)F2X/4XK22
14.4.6 PWM STEERING MODE
In Single Output mode, PWM steering allows any of the
PWM pins to be the modulated signal. Additionally, the
same PWM signal can be simultaneously available on
multiple pins.
Once the Single Output mode is selected
(CCPxM<3:2> = 11 and PxM<1:0> = 00 of the
CCPxCON register), the user firmware can bring out
the same PWM signal to one, two, three or four output
pins by setting the appropriate Steering Enable bits
(STRxA, STRxB, STRxC and/or STRxD) of the
PSTRxCON register, as shown in Table 14-13.
Note:
The associated TRIS bits must be set to
output (‘0’) to enable the pin output driver
in order to see the PWM signal on the pin.
While the PWM Steering mode is active, CCPxM<1:0>
bits of the CCPxCON register select the PWM output
polarity for the PxD, PxC, PxB and PxA pins.
The PWM auto-shutdown operation also applies to
PWM Steering mode as described in Section 14.4.3
“Enhanced PWM Auto-shutdown Mode”. An auto-
shutdown event will only affect pins that have PWM
outputs enabled.
FIGURE 14-18:
STRxA
PxA Signal
CCPxM1
PORT Data
STRxB
SIMPLIFIED STEERING
BLOCK DIAGRAM
PxA pin
1
0
TRIS
CCPxM0
PORT Data
STRxC
PxB pin
1
0
TRIS
CCPxM1
PORT Data
STRxD
1
PxC pin
0
TRIS
CCPxM0
1
PxD pin
PORT Data
0
TRIS
Note 1:
2:
Port outputs are configured as shown when
the CCPxCON register bits PxM<1:0> = 00
and CCPxM<3:2> = 11.
Single PWM output requires setting at least
one of the STRx bits.
14.4.6.1 Steering Synchronization
The STRxSYNC bit of the PSTRxCON register gives
the user two selections of when the steering event will
happen. When the STRxSYNC bit is ‘0’, the steering
event will happen at the end of the instruction that
writes to the PSTRxCON register. In this case, the
output signal at the PxA, PxB, PxC and PxD pins may
be an incomplete PWM waveform. This operation is
useful when the user firmware needs to immediately
remove a PWM signal from the pin.
When the STRxSYNC bit is ‘1’, the effective steering
update will happen at the beginning of the next PWM
period. In this case, steering on/off the PWM output will
always produce a complete PWM waveform.
Figures 14-19 and 14-20 illustrate the timing diagrams
of the PWM steering depending on the STRxSYNC
setting.
DS41412B-page 198
Preliminary
 2010 Microchip Technology Inc.