I assume you're using one of the PicBasic compilers since you're using PULSOUT to control your servos. You need to setup a loop that will apply pulses to each servo, and keep pulses on the servo for a longer duration.
@ 20MHz PULSOUT has a resolution of ~2uS. If you're using PicBasic, then you'll also want to setup the pulse for logic 1 or logic 0 by first setting or clearing each pin used with PULSOUT.
PULSOUT works by toggling the I/O-pin twice, so the initial state of the pin determines the polarity of the pulse.
I.E.
LOW RS1 ' Clear RS1 output pin PULSOUT RS1, 450 ' Output a high going pulse on RS1 for 450 x 2uS
This creates a single 900uS high going pulse out on RS1 by toggling RS1 from low to high, then back low.
Your code as-is moves on to pulse the next servo too quickly to have any noticeable affect on a previous servo since It leaves too big a gap between pulse updates. You need roughly a 50-60Hz update time.
Your code as-is
Example; __________ | | PULSOUT RS1, 450 ----------| 900uS |----------------900us x 11 more servos = 9.9mS before pulsing RS1 again.
Almost 10mS before you pulse each servo.
You probably aren't going to reliably control 12 servos simultaneously using PicBasic and a 20MHz clock.
Have a look in our Micro-Bot section at the link below for servo control routines.
formatting link
This bot uses only two servos, but the code is all in PicBasic Pro, and will give you an idea how it works. There's a table at the bottom of the page showing PULSOUT resolution for different clock speeds.
You can find code examples & schematics for IR navigation, servo control, sonar range finding, remote control, hardware PWM, distance measurement, and a few more by clicking on the Back to Index links on the same page.
Hope this helps.
Regards,
-Bruce snipped-for-privacy@rentron.com
formatting link