Datasheet

2011-2012 Microchip Technology Inc. Preliminary DS41579D-page 205
PIC16(L)F1782/3
24.1 Fundamental Operation
PSMC operation is based on the sequence of three
events:
Period Event – Determines the frequency of the
active signal.
Rising Edge Event – Determines start of the
active pulse. This is also referred to as the phase.
Falling Edge Event – Determines the end of the
active pulse. This is also referred to as the duty
cycle.
The basic waveform generated from these events is
shown in Figure 24-2.
FIGURE 24-2: BASIC PWM WAVEFORM GENERATION
Each of the three types of events is triggered by a user
selectable combination of synchronous timed and
asynchronous external inputs.
Asynchronous event inputs may come directly from an
input pin or through the comparators.
Synchronous timed events are determined from the
PSMCxTMR counter, which is derived from internal
clock sources. See
Section 24.2.5 “PSMC Time Base
Clock Sources”
for more detail.
The active pulse stream can be further modulated by
one of several internal or external sources:
Register control bit
Comparator output
CCP output
Input pin
User selectable deadtime can be inserted in the drive
outputs to prevent shoot through of configurations with
two devices connected in series between the supply
rails.
Applications requiring very small frequency granularity
control when the PWM frequency is large can do so
with the fractional frequency control available in the
variable frequency fixed Duty Cycle modes.
PSMC operation can be quickly terminated without
software intervention by the auto-shutdown control.
Auto-shutdown can be triggered by any combination of
the following:
PSMCxIN pin
sync_C1OUT
sync_C2OUT
sync_C3OUT
1 2 3
PWM Cycle Number
Inputs
Period Event
Rising Edge Event
Falling Edge Event
Outputs
PWM output