Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

how to generate sinusoidal PWM...

Status
Not open for further replies.

kvrajasekar

Junior Member level 3
Joined
Sep 18, 2008
Messages
28
Helped
2
Reputation
4
Reaction score
2
Trophy points
1,283
Activity points
1,517
sinusoidal pwm

Hi,

I am using 16f72 asm code to generate sinusoidal PWM.I not getting idea to start,Theory says that sine pwm can be generated by comparing sine and triangular waves.

I know how to use CCP module.can anyone help me how to do the same using software.

Please give me some ideas to start my project
 

sinusoidal pulse width modulation

I don't know about the PIC but generally it can be like this.

1. Based on desired frequency (fo) decide the Counter/Timer clock(fc) and Timer overflow rate(ft). ft = fc/MAX(timer value)

2. Make a table of the "PWM duty cycles" for the desired frequency. the number of entries in the Table will be n = ft/fo

3. Enable the timer for PWM output and interrupt on overflow.

4. On overflow of timer, program a new PWM value from table.
 

pwm sinusoidal

There are lots of PIC PWM examples at microchip.com
 

sinosoidal pwm

Thanks for the reply...

Mr AMK1971 given me good logic..i have tried using CCP1 in compare mode,but i didnt get the correct output.Is the pwm will be generated only using CCP1 in PWM mode?

My input freq is 50HZ and switching freq is 20khz.
 

sinusoidal pwm

check the link

rbsfm.ej.am/Downloads/APPNOTE/PowerControl/H1105.PDF
 

pwm sinusoidal microcontroller

The PWM generated by a microcontroller will give you a square wave, then you will need to apply a process to convert it to sinusoidal, like a filter.
 

make sinusoidal pwm

AMK1971 said:
I don't know about the PIC but generally it can be like this.

the number of entries in the Table will be n = ft/fo

There is no need for that many entries. 0º to 90º table can be re-used in whole cycle.
 

pic program for sinusoidal pulse width modulation

Thanks for the above replies.I created 90 degree loop and inverted that according to the requirement.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top