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.

Sine PWM generation using PIC16F877

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
Hi,

I have requirement of sinosuidal PWM
that uses a sine wave to be compared with triangular signal to produce the
PWM wave required .
I am using pic 16F877 .can anyone please post some projects or related links.

I dont know how to do this.


Regards,
Raja.
 

pwm sine

Hello.

The sine wave must be uni-polar because the MCU won`t read negative cycle. Use a full bridge to make it uni-polar and same goes for the triangular wave. Then you can use the Compare function (CCP) of the MCU to compare both waves.

Why don`t you generate PWM signal directly through MCU?
 

pwm sine

Hi,
Thanks for the response.

Sine and triangle are compared internally thru software.triangle is generated using counters,and sine by LUT.This is my requirement.

Can u give me the steps to generate sine pwm.Here i am also using PID for feedback loop.



Regards,
Raja.
 

triangular pwm

This sounds way too complicated. The PIC you're using has built-in support for PWM generation, and it's pretty easy to use. Just look it up in the datasheet.

Is there a reason why you can't use the PIC's built-in PWM hardware?
 

sine to pwm

It seems you already know what and how you are suposed to do this, but dont want to do it. Don't waste time searching for finished solution on internet, seems your profs are smart. All projects will use hardware pwm generation as is more efficient and your project is using software routines deliberately to force you to learn something.
 

sine pwm

I think you can use sine wave formula in start of your program to generating LUT, somthing like this:


float teta;
unsigned char sample[180];

for (i=0; i<180; i++)
{
teta = ( (float) i / 180 ) * 3.14159;
sample = (int) (255 * sin ( teta ));
}
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top