cancel
Showing results for 
Search instead for 
Did you mean: 

How can i generate a master PWM that can vary from 1 to 70% of duty cycle and other 2 PWM with 50% but all with same frequency?

AVoig.1
Associate II
 
2 REPLIES 2
S.Ma
Principal

Take a timer with at least 3 channels.

How many steps for duty cycle will be the minimum overflow period. Say 100 for 1% increment. Set Timer clock x 100 to be the desired frequency, then set each channel compare to the desired duty cycle and activate the pwm generation.

AVoig.1
Associate II

But I want to make a phase shift from the other two PWM that are 50% duty cycle and complementary one with each other. I want to vary the first PWM independent from the other and want to phase shift. I don´t know how to put this in code to change the value of phase shift.