Forum Discussion
Altera_Forum
Honored Contributor
10 years agoDeforming of 60Hz sine wave wrt time based on 20KHz SPWM
Hello everyone! I am using altera ep2c5t144c8 mini development board to get the output of 60Hz sine wave with the carrier frequency of 20KHz. I,ve got the results of SPWM but with spikes in ...
Altera_Forum
Honored Contributor
10 years agoone thing I notice your counters are restrained only if equal to maximum set but they can be over max so they keep adding.
for example if(counter_pwm = 2500) then counter_pwm := 0 end if; it should be more than or equal. if you are just adding 1 that shouldn't matter but what about count which adds 83 and what is this logic meant to do: if (count < 208335) then count := 0;