change direction of servo motor

Thread Starter

mastertiger

Joined Jul 9, 2012
24
how can i change direction of servo motor ?
i using pic 16f877a to control it
i use normal pin not pwm pin
i can easy control it in one direction
i need to change direction
thanks


 

BMorse

Joined Sep 26, 2009
2,675
well, if you are already "controlling" the servo one way it should not be hard to change the timing to move it the other way, assuming you are talking about RC Servos, since you did not provide any motor specs or circuit schematics or even code for that matter so people could easily understand what it is you are talking about.....
 

Thread Starter

mastertiger

Joined Jul 9, 2012
24
void main()
{
int x;
trisb=0;
trisd=0;
portb=0;
portd=0;

for(x=0;x<4;x++)
{
PORTB.F7 = 1;
Delay_us(1000);//1ms Delay
PORTB.F7 = 0;

Delay_us(1000);

}
}

i used portb pin 7 as output for signal wire of servo motor
this loop move motor on one direction
i use servo motor sys s3006
 
Top