Forum Discussion
Altera_Forum
Honored Contributor
10 years agosine wave using Different duty cycles of PWM
Hi i am having problem in generating different duty cycles of PWM. can somebody check my code and tell what is wrong. well code is generating a duty cycle but it does not change it automatically as t...
Altera_Forum
Honored Contributor
10 years agoSo you've 'tested' it but you haven't simulated it - is that right?
Try simulating your code - like I did. The problem will be much clearer when you're looking at the behaviour of your code and not just the resulting output signal. Once again simulate your code! Make sure you're happy with the simulation before you even try it on hardware. Cheers, Alex hint: perhaps try counter[15:8] - (not the whole solution but a start...)