hello everyone.. need some help..
I'm using PIC16f877a to control the servo motor
and my problem is.. when I combine my servo motor cooding, the motor is not function on circuit board..
but when i'm using proteus for testing, the motor run smoothly.. what should i do..?!
this is my induvidual cooding to control servo motor..
-MicroC-
void main(void)
{
TRISB = 0xFF;
TRISC = 0x00;
PORTC = 0x00;
Pwm1_Init(10000);
while(1)
{
if (PORTB.B0 == 0)
{
Pwm1_Set_Duty(255); //50% Duty Cycle for forward
Pwm1_Start();
}
else if (PORTB.B1 == 0)
{
Pwm1_Set_Duty(127); //25% Duty Cycle for reverse
Pwm1_Start();
}
}
}