User manual

Main PSMC Configuration GUI
2012-2013 Microchip Technology Inc. DS40001671B-page 21
Entering the value as percent determines the active pulse width as a percentage of the
period. The active pulse width is the time from when the PWM output goes active (rising
event) to the time the PWM output is terminated (falling event). When the percent value
is entered then the falling event count is calculated based on the existing period count
and rising event values. Unlike the time value, the percent value remains constant
when the psmc_clk or period values are changed. This is possible when the rising
event time is zero (most applications) because the new falling event count, as a result
of changes to the psmc_clk and period, will always be valid. In the unlikely event that
a percentage value is entered that causes the falling event count to exceed the period
count, then a warning dialog will appear and the falling event count will be adjusted to
the maximum valid count.
2.17.2 Asynchronous Selection
Asynchronous falling events are selected by clicking on any X leading to the 7-wide OR
gate of the control. Inputs are identified by source signal name appended by a “_B”,
which indicates that the signal first passed through the blanking function. Input
selections vary by device. When all selections are open then the connection to the
output OR gate is shown as open. This connection cannot be changed by clicking.
Instead it closes automatically when any asynchronous input is selected.
2.17.3 Asynchronous Polarity (not available on PIC16(L)F1782/3)
The output from the 7-wide OR gate can be clicked to change the polarity of the
asynchronous event. Figure 2-7 shows the polarity control enabled to invert the signal.
The default polarity is not inverted and the output will be shown as a straight line. The
cursor will change to a hand when moved to the output selection area. The cursor will
not change in devices that do not have this feature.
2.17.4 Interrupt
The synchronous falling event can be selected as a timed interrupt source by clicking
on the switch image leading to the line labeled as interrupt. Closing this switch connects
the synchronous falling event out to the PMSC timed interrupt summary bit in the
device PIRx register. Enabling the synchronous falling event interrupt also requires
checking the timed event interrupt enable box on the main window.
2.18 MODULATION
The modulation control, shown in Figure 2-8, is opened by clicking on the modulation
block in the main GUI. Modulation is used in applications that need to gate the PWM
output on and off. For example, infrared communications typically have a carrier PWM
frequency to pulse the IR emitters which is then modulated on and off by the
intelligence data.