#include<reg51.h>
#include<intrins.h>
#define uchar unsigned char
#define uint unsigned int
void delay(uint a)
{
uchar i;
whlie(a--)for(i=0;i<120;i++);
}
main()
{
uint led=0xfffe;
while(1)
{
P0=led;
P2=led>>8;
led=_irol_(led,1);
delay(200);
}
}
温馨提示:答案为网友推荐,仅供参考