Wingmax
New Member
Controlling multiple servo motors
This is a slight modification from my previous post- " Control position of a servo motor".
With this modification we can connect and control more than one servo motor.
Please refer to timing chart:

Within the one period of the pulse train we can trigger the second motor after the pulse of the first one is off. Because the max pulse width for the motor is about 2mS, we can "insert" more pulses as long as total pulse width are well within one period of the waveform.
Please refer to program:
View attachment Multi servo.txt
Four switches are connected to RA1 to RA4. PWM are connected to RB1 and RB2. The program modificaton was really simple.
This is a slight modification from my previous post- " Control position of a servo motor".
With this modification we can connect and control more than one servo motor.
Please refer to timing chart:

Within the one period of the pulse train we can trigger the second motor after the pulse of the first one is off. Because the max pulse width for the motor is about 2mS, we can "insert" more pulses as long as total pulse width are well within one period of the waveform.
Please refer to program:
View attachment Multi servo.txt
Four switches are connected to RA1 to RA4. PWM are connected to RB1 and RB2. The program modificaton was really simple.
Last edited: