You can use a subroutine that will send a single pulse to each servo... something like this
Send_Servo_Pulses:
PULSOUT Servo1, Pulses
PULSOUT Servo2, Pulses
PULSOUT Servo3, Pulses
PAUSE 20
RETURN
This will allow each servo to increment in proportion to the rest of the servos while allowing a quick pause to check other systems, sensor inputs, etc.
Also Parallax produces a controller for multiple servos using serial data. However if you keep the program fairly simple a similar subroutine modified to your purposes should work just fine. Let me know if this helps.
Bryce W said...
You can use a subroutine that will send a single pulse to each servo... something like this
Send_Servo_Pulses:
PULSOUT Servo1, Pulses
PULSOUT Servo2, Pulses
PULSOUT Servo3, Pulses
PAUSE 20
RETURN
This will allow each servo to increment in proportion to the rest of the servos while allowing a quick pause to check other systems, sensor inputs, etc.
You might want to reduce the PAUSE time a bit if you find the servos aren't running smoothly.
If it happens that the commands to the servos will be identical you can just tie the signal lines together - run multiple servos off the same pin.
There are lots of solutions for driving many servos from a Stamp, but most of them involve some kind of peripheral processor for the Stamp, everything from an SX for the ServoPal to a Propeller for Parallax's new servo controller. A Stamp by itself could control several servos, but becomes increasingly useless for any other functions as the number of servos increases. Since a servo could use a pulse as long as 2.5ms and a Stamp can only do one thing at a time, the Stamp will get too busy to do anything else with 7 to 8 servos.
Comments
Send_Servo_Pulses:
PULSOUT Servo1, Pulses
PULSOUT Servo2, Pulses
PULSOUT Servo3, Pulses
PAUSE 20
RETURN
This will allow each servo to increment in proportion to the rest of the servos while allowing a quick pause to check other systems, sensor inputs, etc.
Also Parallax produces a controller for multiple servos using serial data. However if you keep the program fairly simple a similar subroutine modified to your purposes should work just fine. Let me know if this helps.
You might want to reduce the PAUSE time a bit if you find the servos aren't running smoothly.
If it happens that the commands to the servos will be identical you can just tie the signal lines together - run multiple servos off the same pin.
Rich H
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
The Servo Boss, a 12 channel servo tester kit from Gadget Gangster.