Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

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.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top