Microchip Technology DM164130-2 Data Sheet

Page of 478
PIC16(L)F1946/47
DS41414D-page 238
 2010-2012 Microchip Technology Inc.
23.5
Register Definitions: ECCP Control
  
REGISTER 23-1:
CCPxCON: CCPx CONTROL REGISTER  
R/W-00
R/W-0/0
R/W-0/0
R/W-0/0 R/W-0/0 R/W-0/0  R/W-0/0
R/W-0/0
PxM<1:0>
(1)
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
(1)
Capture mode:
Unused
Compare mode:
Unused
If CCPxM<3:2> = 00, 01, 10:
xx = PxA assigned as Capture/Compare input; PxB, PxC, PxD assigned as port pins
If CCPxM<3:2> = 11:
11 =
Full-Bridge output reverse; PxB modulated; PxC active; PxA, PxD inactive
10 =
Half-Bridge output; PxA, PxB modulated with dead-band control; PxC, PxD assigned as port pins
01 =
Full-Bridge output forward; PxD modulated; PxA active; PxB, PxC inactive
00 =
Single output; PxA modulated; PxB, PxC, PxD assigned as port pins
bit 5-4
DCxB<1:0>: PWM Duty Cycle Least Significant bits
Capture mode:
Unused
Compare mode:
Unused
PWM mode:
These bits are the two LSbs of the PWM duty cycle. The eight MSbs are found in CCPRxL.
bit 3-0
CCPxM<3:0>: ECCPx Mode Select bits
1011 = Compare mode: Special Event Trigger (ECCPx resets Timer, sets CCPxIF bit, starts A/D conversion if
A/D module is enabled)
(1)
1010 = Compare mode: generate software interrupt only; ECCPx pin reverts to I/O state
1001 = Compare mode: initialize ECCPx pin high; clear output on compare match (set CCPxIF)
1000 = Compare mode: initialize ECCPx pin low; set output on compare match (set CCPxIF)
0111 = Capture mode: every 16th rising edge
0110 = Capture mode: every 4th rising edge 
0101 = Capture mode: every rising edge
0100 = Capture mode: every falling edge 
0011 = Reserved
0010 = Compare mode: toggle output on match
0001 = Reserved 
0000 = Capture/Compare/PWM off (resets ECCPx module)
CCP4/CCP5 only:
11xx  =
PWM  mode
ECCP1/ECCP2/ECCP3 only:
1111 = PWM mode: PxA, PxC active-low; PxB, PxD active-low
1110 = PWM mode: PxA, PxC active-low; PxB, PxD active-high
1101 = PWM mode: PxA, PxC active-high; PxB, PxD active-low
1100 = PWM mode: PxA, PxC active-high; PxB, PxD active-high
Note 1:
These bits are not implemented on CCP<5:4>.