Changing PWM Duty Cycles

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Changing PWM Duty Cycles

1,962 Views
admin
Specialist II
Hi all,
 
I'm using an MC9S08AW16 and doing some stuff with the PWM output off of timer 2.  In my app, I need to change the duty cycle on the fly.  I consulted some Freescale app notes similar to my application, and found that they updated the PWM duty cycle (the timer channel's value register) using an interrupt generated by the timer channel that I'm using (TPM2CH1).  I've tried this several different ways, and the only way I've gotten this to work is if I update the duty cycle using the timer 2 overflow interrupt rather than the channel's interrupt.  Anyone experience anything similar?
 
Thanks,
Tomahawk
Labels (1)
0 Kudos
1 Reply

259 Views
admin
Specialist II
Anyone?  Anyone?
0 Kudos