aastha.kanwar
Member • Jul 13, 2011
avr 32 microcontroller
Hello everyone,
I am working with AVR UC3C and I need to use the PWM counter.
I want the counter to start at the begining of period (and go upto the channel period value) and then by comparing the value of counter with my values, I can perform various actions at different instants within pwm pulse. So, basically I need counter to synchronize all the actions within a pwm pulse.
For example if pwm period is 100, then I can tell the µc what to do at counter = 40, 60 or 70.
I know it is possible but I cant seem to find the right instruction for initializing the counter and comparing the value.
Can anyone please help me with this? I need it urgently. Thanks alot.
I am working with AVR UC3C and I need to use the PWM counter.
I want the counter to start at the begining of period (and go upto the channel period value) and then by comparing the value of counter with my values, I can perform various actions at different instants within pwm pulse. So, basically I need counter to synchronize all the actions within a pwm pulse.
For example if pwm period is 100, then I can tell the µc what to do at counter = 40, 60 or 70.
I know it is possible but I cant seem to find the right instruction for initializing the counter and comparing the value.
Can anyone please help me with this? I need it urgently. Thanks alot.