dspic33fj12GP202 based sinusoidal pulse width modulation generation




dspic33fj12GP202 microcontroller based sinusoidal pulse width modulation generation. Hi Everyone, I hope you are fine and doing well.  In this article you will learn how to generate sinusoidal pulse width modulation using dspic33fj12GP202 microcontroller. I have found many people searching on internet regarding how to generate SPWM using DSpic microcontroller.  So I will explain here how to generate SPWM using built in PWM module of dspic33fj12GP202 microcontroller. SPWM generation is very important in power electronics projects.  I have already posted many project related to power electronics inverters. you may also like to check them.

dspic33fj12GP202 based sinusoidal pulse width modulation generation

So in this project, we will create sinusoidal pulse width modulation using dspic33fj12GP202. Mostly pure sine wave inverters available in market use dspic microcontrollers due to its high performance and high speed calculation power.  I have used dspic33fj12GP202 in this tutorial. But same logic can be applied to any DsPIC series of microcontrollers.  Let’s start with the introduction of dspic33fj12GP202 features which are used for SPWM generation.

Output compare module of dspic33fj12GP202 in PWM mode for sinusoidal pulse width modulation generation

Output compare module of dspic33fj12GP202 microcontroller is used in PWM mode to generate SPWM. This module use two sixteen bit timers that is Timer 2 and Timer 3. OCM compares the set value of timer register with OCM registers OCxR and OCxRS.  When both values becomes equal to each other, state of output pin changes. It happens only once in one period of PWM. dspic33fj12GP202 contains 2 output compare modules. So we can can generate only two PWM with the help of this DsPIC microcontroller.  Output compare control registers for dspic33fj12GP202 microcontroller is given.

READ  How To Use PIC Microcontroller For Voice Input And Output

dspic33fj12GP202 based sinusoidal pulse width modulation generation schematics

Above register details shows how to use dspic33fj12GP202 output compare as a PWM. It can use either TIMER2 or TIMER3 as a time setting which can be configured through OCTSEL bit of OCxCON register as shown above. So I have used output compare module as a PWM to generate sinusoidal pulse width modulation. PRy register is used to set period or frequency of PWM.

Read more: dspic33fj12GP202 based sinusoidal pulse width modulation generation




Leave a Comment

*
= 4 + 4

Read previous post:
Making Your First Printed Circuit Board – Getting Started With PCBWAY [PART 1]
Making Your First Printed Circuit Board – Getting Started With PCBWAY [PART 1]

If you are into electronics, PCBs (Printed Circuit Board) are some of the most common things you will see. These...

Close
Scroll to top