**八个流水灯隔灯点亮 **
#include <reg51.h>
#define uchar unsigned char
#define uint unsigned int
uchar code dd[]=
{
0xfe,0xfd,0xfb,0xf7,
0xef,0xdf,0xbf,0x7f,
};
void delay(unit x)
{
while(–x)
{
uchar i;
for(i=0;i<144;i++)
{}
}
}
void main()
{
uchar i;
while(1)
{
i=0xfe;
for(i=0;i<8;i++)
{
P1=dd[i+1];
delay(500);
}
}
}
05-05
694
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
01-18
1789
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)