Page 1 of 1

Creating sinusoidal PWM

Posted: Sun May 18, 2008 12:51 pm
by wam
Hi,

I am kind of new about programming dsPIC and I have limited time to finish my project and I decided to use simulink. I need to generate sinusoidal PWM by comparing sinusoidal reference with triangular waveform and obtain the output from PWM1L pin of the dsPIC30f4011. Can you help me about this? :?: My PWM frequency will be 4 kHz.

Re: Creating sinusoidal PWM

Posted: Mon May 19, 2008 6:30 pm
by LubinKerhuel
Hi Wam,

The project seems quite small and could do it with the demo version of the blockset.
I do not get the meaning of :
wam wrote:triangular waveform and obtain the output from PWM1L
You 'd rather start your project and post question about the model you create if you are in trouble.

Lubin

Re: Creating sinusoidal PWM

Posted: Tue May 20, 2008 5:26 am
by wam
Hi LubinKerhuel,

Thanks for the reply. I will use normal sinusoidal PWM scheme. As you know if you want to do that you can feed comparator with sinusoidal and triangular waveform. PWM1L is the pin in dsPIC30F4011 and I want to get the PWM output from that pin.

Re: Creating sinusoidal PWM

Posted: Wed May 28, 2008 3:58 am
by wam
Can I get output from motor control PWM pin outputs such as PWM1L. I have to use this because I built my PCB to get PWM output signals from dsPIC. However I am not using motor control modules. I mean instead of getting signal from "OC1" pin, can I get exactly same signal from PWM1L (dsPIC30F4011) pin using your blocks?
Thank you very much...

Re: Creating sinusoidal PWM

Posted: Wed May 28, 2008 8:09 am
by LubinKerhuel
wam wrote:can I get exactly same signal from PWM1L
Yes,
However, one difference between PWM motor and OC (Output Compare) block is that the PWM signal period cannot be changed during execution (with the PWM block). Since your period is fixed (Frequency set to 4Khz), It is OK.