stepper motor controll with AT89C51
I want to controll Stepper motor with At89c51..
and i made simulation in proteus.. and program made in keil
.
.
.
but i cant make loop for it.... it will rotate only one rotation
so, can Anybudy help me for making loop...???😔.. for full rotation....
this is the fig.
![[IMG]](proxy.php?image=https%3A%2F%2Flh4.googleusercontent.com%2F-wEShtHzrqKw%2FT23RT7wbvNI%2FAAAAAAAAAFw%2FFQLpnLshB-8%2Fw1004-h433-k%2Fstepper%252Bmotor%252Bcontroll.png&hash=41bc323fa17de06eb8c823d311b71e66)
and this is code for it...
#include<at89x51.h>
void delay(unsigned int);
void main (void)
{
P2_4=0;
delay(30000000000);
P2_4=1;
delay(30000000000);
P2_2=0;
delay(30000000000);
P2_2=1;
delay(30000000000);
P2_3=0;
delay(30000000000);
P2_3=1;
delay(30000000000);
P2_1=0;
delay(30000000000);
P2_1=1;
delay(30000000000);
}
void delay(unsigned int itime)
{
int i;
for(i=0;i<itime;i++);
}