Microchip Technology MA160014 Data Sheet
PIC18(L)F2X/4XK22
DS41412F-page 206
2010-2012 Microchip Technology Inc.
REGISTER 14-2:
CCPxCON: ENHANCED CCPx CONTROL REGISTER
R/x-0
R/W-0
R/W-0
R/W-0 R/W-0
R/W-0 R/W-0
R/W-0
PxM<1:0>
DCxB<1:0>
CCPxM<3:0>
bit 7
bit 0
Legend:
R = Readable bit
W = Writable bit
U = Unimplemented bit, read as ‘0’
u = Bit is unchanged
x = Bit is unknown
-n/n = Value at POR and BOR/Value at all other Reset
‘1’ = Bit is set
‘0’ = Bit is cleared
bit 7-6
PxM<1:0>: Enhanced PWM Output Configuration bits
If CCPxM<3:2> = 00, 01, 10: (Capture/Compare modes)
xx
= PxA assigned as Capture/Compare input; PxB, PxC, PxD assigned as port pins
Half-Bridge ECCP Modules
(1)
:
If CCPxM<3:2> = 11: (PWM modes)
0x
= Single output; PxA modulated; PxB assigned as port pin
1x
= Half-Bridge output; PxA, PxB modulated with dead-band control
Full-Bridge ECCP Modules
(1)
:
If CCPxM<3:2> = 11: (PWM modes)
00
= Single output; PxA modulated; PxB, PxC, PxD assigned as port pins
01
= Full-Bridge output forward; PxD modulated; PxA active; PxB, PxC inactive
10
= Half-Bridge output; PxA, PxB modulated with dead-band control; PxC, PxD assigned as port
pins
11
= Full-Bridge output reverse; PxB modulated; PxC active; PxA, PxD inactive
bit 5-4
DCxB<1:0>: PWM Duty Cycle Least Significant bits
Capture mode:
Unused
Unused
Compare mode:
Unused
Unused
PWM mode:
These bits are the two LSbs of the PWM duty cycle. The eight MSbs are found in CCPRxL.
These bits are the two LSbs of the PWM duty cycle. The eight MSbs are found in CCPRxL.
Note 1:
See
to determine full-bridge and half-bridge ECCPs for the device being used.