Quantcast
Channel: Microcontrollers
Viewing all articles
Browse latest Browse all 215998

Forum Post: Problem in generation of pwm pulses using Example_2802xCpuTimer.c file

$
0
0

Hii..,

I am using C2000 Piccolo launchpad with CCS5.5 version for three phase sinepwm generation. I am writing code in cputimer example file with functions from pwm example file. but I am not getting pwm pulses sine wave seen on internal graph is also distorted. My code is given below; If you know another method for the same please help me.

Is highlighted code comparing va with triangular wave?

interrupt void cpu_timer0_isr(void)

{
timer0IntCount++;

if(t>(100))
t=0.0;
t=t+100e-6;
va=1*sin(2*3.141592*50*t);
vb=1*sin(2*3.141592*50*t-(2*3.14/3));
vc=1*sin(2*3.141592*50*t+(2*3.14/3));


// Set Compare values
PWM_setCmpA(myPwm1,(1000*va)+1000); // Set compare A value
PWM_setCmpB(myPwm1,(1000*va)+1000); // Set Compare B value


Viewing all articles
Browse latest Browse all 215998

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>