0
1.1kviews
Draw labelled interfacing diagram of stepper motor with 8951. Write a C program to rotate it in counterclockwise direction.
1 Answer
0
6views

enter image description here

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

 }
Please log in to add an answer.