#include<reg51.h>
sfr stepper=0x90;
void delay(){
unsigned char i,j,k;
for(i=0;i<6;i++)
for(j=0;j<255;j++)
for(k=0;k<255;k++);
}
void main(){
P1=0x00;
while(1){
stepper = 0x08;
delay();
stepper = 0x0C;
delay();
stepper = 0x04;
delay();
stepper = 0x06;
delay();
stepper = 0x02;
delay();
stepper = 0x03;
delay();
stepper = 0x01;
delay();
stepper = 0x09;
delay();
}
}
No comments:
Post a Comment