This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MSP430G2553: PWM phase control

Part Number: MSP430G2553
Hello, I want to create 2 different PWM signals of 10 kHz with MSP430G2553. DUTY cycle value of PWM signals is 50% and fixed. Two different potentiometers are connected to the microprocessor and these potentiometers are responsible for shifting the PWM signals by 0-100uS (0-180 degrees).
Can I do this with existing timer hardware? How else can I do this?
  • For the particular case of 50% duty, you can do this by 

    1) Run the timer at 2x your target frequency,

    2) Use OUTMOD=4 (Toggle) on both output pins to give 50% duty (at the target frequency),

    3) Set CCR1=0 then adjust CCR2 to create the phase difference.

    Since the timer is 2x the target frequency (half the period), in order to get 100 steps you need SMCLK to be at least 200x the timer frequency. For a 10kHz target frequency, this would be SMCLK>=2MHz.

**Attention** This is a public forum