#include
P1.0=A ;P1.1=a ;P1.2=B ; P1.3=b
code unsigned char run[8]={0x08,0x0a,0x02,0x06,0x04,0x05,0x01,0x09}; //两相四线八拍工作方式
void delay(unsigned char i)//延时函数ms
{
unsigned char j,k;
for(j=i;j>0;j--)
for(k=110;k>0;k--);
}
main()
{
unsigned char z;
while(1)
{
for(z=0;z<8;z++)
{
P1=run[z];
delay(5);
}
}
}