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
PWM and Servo motor
Moderator: Benj
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: PWM and Servo motor
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
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
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel