Microchip Technology MA160014 Data Sheet
2010-2012 Microchip Technology Inc.
DS41412F-page 179
PIC18(L)F2X/4XK22
14.0
CAPTURE/COMPARE/PWM
MODULES
MODULES
The Capture/Compare/PWM module is a peripheral
which allows the user to time and control different
events, and to generate Pulse-Width Modulation
(PWM) signals. In Capture mode, the peripheral allows
the timing of the duration of an event. The Compare
mode allows the user to trigger an external event when
a predetermined amount of time has expired. The
PWM mode can generate Pulse-Width Modulated
signals of varying frequency and duty cycle.
which allows the user to time and control different
events, and to generate Pulse-Width Modulation
(PWM) signals. In Capture mode, the peripheral allows
the timing of the duration of an event. The Compare
mode allows the user to trigger an external event when
a predetermined amount of time has expired. The
PWM mode can generate Pulse-Width Modulated
signals of varying frequency and duty cycle.
This family of devices contains three Enhanced
Capture/Compare/PWM modules (ECCP1, ECCP2,
and ECCP3) and two standard Capture/Compare/PWM
modules (CCP4 and CCP5).
Capture/Compare/PWM modules (ECCP1, ECCP2,
and ECCP3) and two standard Capture/Compare/PWM
modules (CCP4 and CCP5).
The Capture and Compare functions are identical for all
CCP/ECCP modules. The difference between CCP
and ECCP modules are in the Pulse-Width Modulation
(PWM) function. In CCP modules, the standard PWM
function is identical. In ECCP modules, the Enhanced
PWM function has either full-bridge or half-bridge PWM
output. Full-bridge ECCP modules have four available
I/O pins while half-bridge ECCP modules only have two
available I/O pins. ECCP PWM modules are backward
compatible with CCP PWM modules and can be
configured as standard PWM modules. See
CCP/ECCP modules. The difference between CCP
and ECCP modules are in the Pulse-Width Modulation
(PWM) function. In CCP modules, the standard PWM
function is identical. In ECCP modules, the Enhanced
PWM function has either full-bridge or half-bridge PWM
output. Full-bridge ECCP modules have four available
I/O pins while half-bridge ECCP modules only have two
available I/O pins. ECCP PWM modules are backward
compatible with CCP PWM modules and can be
configured as standard PWM modules. See
to determine the CCP/ECCP functionality available on
each device in this family.
each device in this family.
Note 1: In devices with more than one CCP
module, it is very important to pay close
attention to the register names used. A
number placed after the module acronym
is used to distinguish between separate
modules. For example, the CCP1CON
and CCP2CON control the same
operational aspects of two completely
different CCP modules.
attention to the register names used. A
number placed after the module acronym
is used to distinguish between separate
modules. For example, the CCP1CON
and CCP2CON control the same
operational aspects of two completely
different CCP modules.
2: Throughout this section, generic
references to a CCP module in any of its
operating modes may be interpreted as
being equally applicable to ECCP1,
ECCP2, ECCP3, CCP4 and CCP5.
Register names, module signals, I/O pins,
and bit names may use the generic
designator ‘x’ to indicate the use of a
numeral to distinguish a particular module,
when required.
operating modes may be interpreted as
being equally applicable to ECCP1,
ECCP2, ECCP3, CCP4 and CCP5.
Register names, module signals, I/O pins,
and bit names may use the generic
designator ‘x’ to indicate the use of a
numeral to distinguish a particular module,
when required.
TABLE 14-1:
PWM RESOURCES
Device Name
ECCP1
ECCP2
ECCP3
CCP4
CCP5
PIC18(L)F23K22
PIC18(L)F24K22
PIC18(L)F25K22
PIC18(L)F26K22
PIC18(L)F24K22
PIC18(L)F25K22
PIC18(L)F26K22
Enhanced PWM
Full-Bridge
Enhanced PWM
Half-Bridge
Enhanced PWM
Half-Bridge
Standard PWM
Standard PWM
(Special Event Trigger)
PIC18(L)F43K22
PIC18(L)F44K22
PIC18(L)F45K22
PIC18(L)F46K22
PIC18(L)F44K22
PIC18(L)F45K22
PIC18(L)F46K22
Enhanced PWM
Full-Bridge
Enhanced PWM
Full-Bridge
Enhanced PWM
Half-Bridge
Standard PWM
Standard PWM
(Special Event Trigger)