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.

Most Graceful MSP430 Solution for Driving 2 Motors with Varying Power Outputs (2x PWM? DAC? Other?)

Hi all -

Please forgive my naivete, I only dabble with my MSP430 infrequently over the past 7 years.

I have done demos of driving 1 motor via a motor driver board using PWM to accomplish varying degrees of power output.

Now I want to drive 2 motors (2 drive wheels) with varying power to each wheel. I'm not sure if it's possible to use PWM with different duty cycles on different ports.

I simply need to apply, say, 30% power to Wheel A while Wheel B get's 80% power. Or perhaps have Wheel A tasked at a steady 50% power, while Wheel B oscillates between 30% and 100%.

I wonder if there is a more graceful solution ... perhaps using a DAC or something like that.

I AM reading about this tonight, but I thought I would put this question out there early in case I get stuck.

Thanks so much. Your help is greatly appreciated.

- Dave F.

  • David Ferreira said:
    Now I want to drive 2 motors (2 drive wheels) with varying power to each wheel. I'm not sure if it's possible to use PWM with different duty cycles on different ports.

    You mean DC motor drive? - Yes, it's possible. You need timer with at least 3 CC (capture compare) registers. One CC register will set PWM period and two remaining will set PWM duty cycle for each wheel driver.

**Attention** This is a public forum