#include"reg52.h"
#include"intrins.h"
#define uint unsigned int
#define uchar unsigned char
void delay(uint z)
{
uint x,y;
for(x=z;x>0;x--)
for(y=100;y>0;y--);
}
void main()
{
uchar aa,bb,cc;
while(1)
{
aa=0xfe;
for(cc=0;cc<8;cc++)
{
for(bb=0;bb<8-cc;bb++)
{
P1=aa;
delay(200);
aa=_crol_(aa,1);
}
aa=_crol_(aa,cc);
P1=0xff;//与上一句无影响,因为没有把p1给aa
aa=aa<<1;
}
}
}
#include"intrins.h"
#define uint unsigned int
#define uchar unsigned char
void delay(uint z)
{
uint x,y;
for(x=z;x>0;x--)
for(y=100;y>0;y--);
}
void main()
{
uchar aa,bb,cc;
while(1)
{
aa=0xfe;
for(cc=0;cc<8;cc++)
{
for(bb=0;bb<8-cc;bb++)
{
P1=aa;
delay(200);
aa=_crol_(aa,1);
}
aa=_crol_(aa,cc);
P1=0xff;//与上一句无影响,因为没有把p1给aa
aa=aa<<1;
}
}
}