slow servo rotation

Thread Starter

pankajhrajput

Joined Feb 25, 2009
1
i have a Futaba s-3003, i am trying to slow down its motion, so as to avoid jerks. i tried the following code.....its not responding properly. can anyone plz tell me where am i goin wrong, or any other way to do this....

#include<16F877A.h>
#include<stdio.h>
#use standard_io(b)
#use standard_io(a)
#use standard_io(d)
#use delay (clock = 4000000)
actuate(int b,int a)
{ int c,i;
c=((a-b)/100);
for(i=0;i<100;i++)
{ b=b+c;
output_high(PIN_B1);
delay_us(b);
output_low(PIN_B1);
delay_us(20000-b);
}
}

void main()
{
actuate(1500,1700);
}
 
Top