0
1.3kviews
Draw labelled interfacing diagram of stepper motor with 8951. Write a C program to rotate it in counterclockwise direction.
1 Answer
written 6.0 years ago by | • modified 6.0 years ago |
#include< reg51.h>
Void delay (unsigned int);
void main (void)
{
while(1)
{
P2=0x33;
delay(10);
P2=0x66;
delay(10);
P2=0xcc;
delay(10);
P2=0x99;
delay(10);
}
}
void delay(unsigned int t)
{
unsigned int x,y;
for(x=0;x<=t;x++)
for(y=0;y<=675;y++);
}