User manual

PSMC Designer User’s Guide
DS40001671B-page 18 2012-2013 Microchip Technology Inc.
The synchronous period event frequency is determined by the time or frequency
entered in the Period Time/Period Freq text box. The Radio button below the box
selects time or frequency as the display. When a value is entered the period count
value is calculated based on the psmc_clk frequency. If the display mode is changed
then the value changes to correspond with the existing count. Likewise, if the
psmc_clk frequency is changed then the period value will be changed to correspond
with the existing count.
2.15.2 Asynchronous Selection
Asynchronous period 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.15.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-5 shows the polarity control enabled to invert the signal.
The default polarity is not inverted, in which case the output will be shown as a straight
line. The cursor will change to a hand when moved to the polarity selection area. The
cursor will not change in devices that do not have this feature.
2.15.4 Interrupt
The synchronous period 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 period event out to the PMSC timed interrupt summary bit in the
device PIRx register. Enabling the synchronous period event interrupt also requires
checking the timed event interrupt enable box on the main window.
2.16 RISING EVENT
The rising event control GUI, shown in Figure 2-6, is opened by clicking on the rising
event block in the main GUI. The rising event starts the active drive of the PWM output.
The rising event source can be synchronous or asynchronous. In most applications the
rising event will be synchronous at 0 us after period event. In this case, starting a PWM
drive by an asynchronous input is accomplished by enabling that input in the period
control. One application for synchronous times greater than 0 is center weighted PWM.
See Center Weighted Variable PWM in Chapter 3. “PSMC Tips”.