Home

PRS PWM

E-mail Print PDF
( 1 Vote )
Usually PWMs are used for applications like Motor control, LED control etc.  A PWM (Pulse Width Modulator) has a variable pulse width, where the width of the pulse can be varied from 0 to 100% of its period.  In the PSoC, a conventional PWM has a simple down counter and a compare register.  When the value in the Count register is less than or equal to the Compare register the Compare output goes high.  The pulse width of the PWM can be varied by changing the value in the Compare register.  The waveform of a conventional PWM operating at 50% duty cycle and its spectrum plot are shown below.





As expected, the harmonic content of a conventional PWM is quite high.  If the down counter is replaced with a Pseudo Random Sequence, the Compare value still causes the same percent of High states, but the high states are randomly dispersed.  For a compare value of 50%, the output has a probability of being High 50% of the time.  The waveform of such a PRS PWM and its spectrum plot are shown below.

PRS PWM Waveform


PRS PWM Spectrum Plot

As seen in the above plot, the dithering of the PWM output significantly removes the harmonics.  This property is very useful in applications where this will significantly reduce radiated noise.

This example project demonstrates how to configure a PRS user module as a PRS PWM.  The outputs from a PRS PWM and a conventional PWM are brought out and filtered using RC Filters.  For the same pulse width setting, the DC measured after the RC filters from the PWM and PRS PWM are the same.  The project and documentation may be downloaded from the below link in Cypress website

PRS PWM Example Project

Comments (0)
Only registered users can write comments!