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.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…