0
18kviews
Write C language program to rotate stepper motor in clockwise direction continuously. Draw interfacing diagram of stepper motor with 89c51 mc.
1 Answer
written 6.0 years ago by | • modified 5.9 years ago |
Program:
#include< reg51.h>
main()
{
void delay(void);
while( 1)
{
P0=0x06;
delay();
P0=0x0C;
delay();
P0=0x09;
delay();
P0=0x03;
delay();
}
}
void delay(void)
{
unsigned char cnt, cnt1;
for(cnt=0; cnt<=254;cnt++)
for(cnt1=0;cnt1<254;cnt1++);
}