Page 1 of 1

PWM and Servo motor

Posted: Sat Oct 17, 2009 5:56 pm
by Mathy
Hello !

I would like to use 8 servomotors and two DC motors. For the DC motors, I would like to use the two PWM output but when I look into the C Code of flowcode, I see that the both use the same register.

I Would like to know if I can use servo and pwm at the same time without any problem, interaction or anything else.

Thank you for your help !

Mathy

Re: PWM and Servo motor

Posted: Mon Oct 19, 2009 8:05 am
by Benj
Hello Mathy

The Servo motor component uses the hardware timers that are also used by the PWM so the answer is no you cannot use them both at the same time. However it is possible to use the servo component and a timer interrupt to manually bit bang the PWM signal.

There is an example of bit banging PWM available from here.
http://www.matrixmultimedia.com/mmforum ... =26&t=6732