HI. multiple rc servo motors

Status
Not open for further replies.

bhaskar0403

Newbie level 3
Joined
Jun 29, 2010
Messages
4
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
hyderabad
Activity points
1,304
HI,
I am using PCA by that i can change only 180,0 and 90 degrees only but i want to control for even 1degree change also....
 

#include"p89v51rd2.h"
void SERVO_INIT();
unsigned int x,y,z,l;

void SERVO_INIT()
{
TMOD=0X02;
TH0=0xce;
TL0=TH0;
TR0=1;

CCON=0X40;
CCAPM1=0X42;
CCAP1H=0x00;
CMOD=0X04;
}

void main()
{
x=180;
y=245-(x*0.17777777777777777777777777777778); //(245-214)/180= 0.17777777777777777777777777777778
SERVO_INIT();
CCAP1H=y; //245----->0 237------>45 229---->90 221------>135 214 ----->180
}

the change of the angle is for every 7degrees
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…