Changing PWM Duty Cycles

Discussion created by Guest on Jun 15, 2006
Latest reply on Jun 22, 2006 by Guest
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

Outcomes