Page 1 of 1

PWM

Posted: Sun Jun 01, 2014 1:38 am
by abtin
Hi

I recently received my micropython and want to use it to control a small DC motor. I want to use Pololu DRV8835 Dual Motor Driver Carrier (http://www.pololu.com/product/2135) and in odrer to control the speed of motor I need to use PWM output. I searched in the Forum and in the docs but couldn't find any example/document to show how a pin can be configured and used as PWM. I appreciate it if anyone can help me with this.

Cheers,
Abtin

Re: PWM

Posted: Sun Jun 01, 2014 6:15 pm
by pfalcon

Re: PWM

Posted: Tue Jun 03, 2014 5:58 pm
by JonHylands
PWM for DC motor control is completely different than PWM for servo control.

I have some motor control PWM code that works with a much older build (before we switched to stmhal) using the DRV8835. What you really need to do is set up a timer on the appropriate pin, and configure it properly.

If you need it, I can post my PWM code, which includes all the setup required.

- Jon