Using the Slope Compensation Module

The Slope Compensation Control 0 (SLPCCON0) register controls the operation of the module.


The Slope Compensation (SC) module can be enabled or disabled by the SCxEN bit.

The SC can act on a signal crossing the rising or falling threshold. This is set with the SCxPOL bit.

The output connection of the SC module is selected by the SCxTSS bits.

The input connection to the SC module is selected by the SCxINS bit.

Setting the Slope Compensation Rate

To set the Slope Compensator rate, the input reference voltage and PWM period must first be determined.

The input reference voltage is simply set to the target circuit peak current sense voltage at the load sensing circuit. The PWM period is simply the inverse of the PWM drive frequency.

The slope compensation output voltage starts at the input reference voltage and should fall at a rate of less than half the target circuit current sense voltage rate of rise. Therefore, the compensator slope, expressed as volts per microsecond, can be computed as shown in the following equation.


This calculated slope compensator value is loaded into the Slope Compensator Current Sink Set (SCxISET) bits of the SLPCCON1 register per the table of values. The range of values can also be adjusted with the slope compensator range bit.


The SCxRNG bit allows you to select the range for the slope of the compensation.
The SCxISET bits set the slope rate value per the following chart.

© 2024 Microchip Technology, Inc.
Notice: ARM and Cortex are the registered trademarks of ARM Limited in the EU and other countries.
Information contained on this site regarding device applications and the like is provided only for your convenience and may be superseded by updates. It is your responsibility to ensure that your application meets with your specifications. MICROCHIP MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND WHETHER EXPRESS OR IMPLIED, WRITTEN OR ORAL, STATUTORY OR OTHERWISE, RELATED TO THE INFORMATION, INCLUDING BUT NOT LIMITED TO ITS CONDITION, QUALITY, PERFORMANCE, MERCHANTABILITY OR FITNESS FOR PURPOSE. Microchip disclaims all liability arising from this information and its use. Use of Microchip devices in life support and/or safety applications is entirely at the buyer's risk, and the buyer agrees to defend, indemnify and hold harmless Microchip from any and all damages, claims, suits, or expenses resulting from such use. No licenses are conveyed, implicitly or otherwise, under any Microchip intellectual property rights.