Servo Controlling using PIC16F877A

Autonomous Robot, Manual Robot, DC Motor Driver, Stepper Motor Driver, Servo, Multi PWM chip.....

Servo Controlling using PIC16F877A Need HELP (URGENT)

Postby aqish88 » Sat Dec 03, 2011 1:01 am

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();

}
}
}
aqish88
Freshie
 
Posts: 5
Joined: Tue Nov 08, 2011 9:02 pm

Re: Servo Controlling using PIC16F877A

Postby robosang » Mon Dec 05, 2011 11:05 pm

Are you controlling standard RC servo? It seem to be modified servo :mrgreen:
robosang
Expert
 
Posts: 1239
Joined: Wed Jun 10, 2009 5:37 pm

Re: Servo Controlling using PIC16F877A

Postby aqish88 » Tue Dec 06, 2011 12:17 am

I'm using C36R.. I'm studying the data sheet but the problem is it's not moving when i applying it for my full cooding system..
aqish88
Freshie
 
Posts: 5
Joined: Tue Nov 08, 2011 9:02 pm

Re: Servo Controlling using PIC16F877A

Postby hyng » Wed Dec 07, 2011 1:36 pm

There is a sample source code under the C36R product page. You can refer to it. Although the sample code is written in C with Hitech C compiler, the basic concept is the same.
User avatar
hyng
Moderator
 
Posts: 292
Joined: Thu Apr 16, 2009 11:35 am

Previous

Return to Robot Controller

Who is online

Users browsing this forum: No registered users and 1 guest

cron