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
1
1.9kviews

enter image description here

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++);

}
Please log in to add an answer.