English
Language : 

PIC16F1938_13 Datasheet, PDF (228/488 Pages) Microchip Technology – 28/40/44-Pin Flash-Based, 8-Bit CMOS Microcontrollers with LCD Driver
PIC16(L)F1938/9
23.5 Register Definitions: CCP Control
REGISTER 23-1: CCPxCON: CCPx CONTROL REGISTER
R/W-00
R/W-0/0
PxM<1:0>(1)
bit 7
R/W-0/0
R/W-0/0
DCxB<1:0>
R/W-0/0
R/W-0/0
R/W-0/0
CCPxM<3:0>
R/W-0/0
bit 0
Legend:
R = Readable bit
u = Bit is unchanged
‘1’ = Bit is set
W = Writable bit
x = Bit is unknown
‘0’ = Bit is cleared
U = Unimplemented bit, read as ‘0’
-n/n = Value at POR and BOR/Value at all other Reset
bit 7-6
bit 5-4
bit 3-0
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:
00 =
01 =
10 =
11 =
Single output; PxA modulated; PxB, PxC, PxD assigned as port pins
Full-Bridge output forward; PxD modulated; PxA active; PxB, PxC inactive
Half-Bridge output; PxA, PxB modulated with dead-band control; PxC, PxD assigned as port pins
Full-Bridge output reverse; PxB modulated; PxC active; PxA, PxD inactive
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.
CCPxM<3:0>: ECCPx Mode Select bits
0000 = Capture/Compare/PWM off (resets ECCPx module)
0001 = Reserved
0010 = Compare mode: toggle output on match
0011 = Reserved
0100 = Capture mode: every falling edge
0101 = Capture mode: every rising edge
0110 = Capture mode: every 4th rising edge
0111 = Capture mode: every 16th rising edge
1000 = Compare mode: initialize ECCPx pin low; set output on compare match (set CCPxIF)
1001 = Compare mode: initialize ECCPx pin high; clear output on compare match (set CCPxIF)
1010 = Compare mode: generate software interrupt only; ECCPx pin reverts to I/O state
1011 = Compare mode: Special Event Trigger (ECCPx resets Timer, sets CCPxIF bit starts A/D conversion if A/D
module is enabled)(1)
CCP4/CCP5 only:
11xx = PWM mode
ECCP1/ECCP2/ECCP3 only:
1100 = PWM mode: PxA, PxC active-high; PxB, PxD active-high
1101 = PWM mode: PxA, PxC active-high; PxB, PxD active-low
1110 = PWM mode: PxA, PxC active-low; PxB, PxD active-high
1111 = PWM mode: PxA, PxC active-low; PxB, PxD active-low
Note 1: These bits are not implemented on CCP4 and CCP5.
DS40001574C-page 228
 2011-2013 Microchip Technology Inc.