#include <reg52.h>
#define uchar unsigned char //宏定义
#define uint unsigned int
unsigned char table[]={0xfe,0xfd,0xfb,0xf7,0xef,0xdf,0xbf,0x7f};//11111110,11111101,11111011.....
/*
延时
*/
void delay(void)
{
uchar a,b;
for(a=0;a<200;a++)
for(b=0;b<200;b++);
}
void main()
{
uchar i;
while(1)
{
for(i=0;i<8;i++)
{
P0=table[i];
delay();
}
}
}