ankit_265
Newbie level 2
- Joined
- Mar 30, 2013
- Messages
- 2
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1,281
- Activity points
- 1,301
Sir, i am having stepper motor of 2 degree step angle.
I m using following c program:
#include<reg51.h>
void main()
{
while(1)
{ void delay (int);
P1=0xCC;
delay(1);
P1=0x66;
delay(1);
P1=0x33;
delay(1);
P1=0x99;
delay(1);
}
}
void delay(int a)
{
unsigned int x,y;
for(x=0;x<10;x++)
for(y=0;y<a;a++);
}
But i want to rotate it to 80 degree only. I want to stop motor at 80 degree.
Please give me the c program for this....??
I m using following c program:
#include<reg51.h>
void main()
{
while(1)
{ void delay (int);
P1=0xCC;
delay(1);
P1=0x66;
delay(1);
P1=0x33;
delay(1);
P1=0x99;
delay(1);
}
}
void delay(int a)
{
unsigned int x,y;
for(x=0;x<10;x++)
for(y=0;y<a;a++);
}
But i want to rotate it to 80 degree only. I want to stop motor at 80 degree.
Please give me the c program for this....??