AnsweredAssumed Answered

Does the high resolution PWM delay block feature work with centered PWM generation?  How do you set up the fractional bits for this mode?

Question asked by Andrew Meares on Aug 25, 2017
Latest reply on Sep 15, 2017 by xiangjun.rong

I am using the PWM in centered mode and I would like to try using the high resolution fraction bits.  I am not sure how to set the fractional bits for VAL2 since VAL2 has a negative number and the counter is counting up from a negative number.


For example, 

SM1INIT = -1000;

SM1VAL1 = +1000;


Say I wanted to set the duty cycle to about 50%.

VAL2 = -500;

VAL3 = +500;


Can I use FRACVAL3, and FRACVAL2, to obtain a duty cycle of 1001.5 counts?  Does this mean you set the FRACVAL3 to 0.25 and FRACVAL2 to 0.75 and VAL2 to -501?


I am using the MC56F82xxx series but this would apply to other processors as well.


Thanks, any tips are welcome.

-Andrew Meares