Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

PWM and sinwave

Status
Not open for further replies.

raedbenz

New Member
HI,,,

I need to generate sinewave using PWM. how?
I am using ARM7. Fpclk= 29.5MHz. I need 2Khz sinewave output.
 
There are several ways.
>Output a 2khz square wave. Pass it through a serious 2khz low-pass filter. The filter will remove all the harmonics above 2khz leaving a sinewave.

>I do not know the ARM7 well. Make the PWM run at 200khz which is 100x what you want. Use a 100 point sine lookup table. Each time the PWM (timer) overflows reload the timer with the next number in the table. The output of the PWM will need a lowpass filter but the filter can be as fast as 100khz.

I hope you know a 100 point table can be made using only 25 points.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top