Gerrit Bogdanski

MC9S12C128 - how to change the PWM dutycycle each period ?

Discussion created by Gerrit Bogdanski on Jul 27, 2007
Latest reply on Aug 8, 2007 by Jeff Smith
Hi,

I'm new in this forum and also a newbie concerning the handling of a microcontoller.
So in advance, please excuse my diction.

I'm using a MC9S12C128 and I'm trying to change the dutycycle of the PWM signal every period, in order to generate a sine like waveform (of the voltage amplitude) on the output pin.
My problem is that I don't know when to write to the PWMDTYx register and how to get the information when a period is over and the PWMDTYx is buffered to be able to write the next information to the PWMDTYx for the following period.

Thanks for your help.


--
Alban Edit: FSL Part Number must figure in Message Subject line.




Message Edited by Alban on 2007-07-27 08:18 PM

Outcomes