|
#include<reg52.h>
#include<intrins.h>
unsigned int t;
unsigned char aa;
void delay(unsigned int);
void main()
{
aa=0xfe;
while(1)
{
P1=aa;
delay(500);
aa=_crol_(aa,2);
}
}
void delay(unsigned int t)
{
unsigned int i,j;
for(i=t;i>0;i--)
for(j=110;j>0;j--);
}
|
|