#include <reg51.H>
unsigned char code table[]={0xfe,0xfd,0xfb,0xf7,
0xef,0xdf,0xbf,0x7f,
0xfe,0xfd,0xfb,0xf7,
0xef,0xdf,0xbf,0x7f,
0x7f,0xbf,0xdf,0xef,
0xf7,0xfb,0xfd,0xfe,
0x7f,0xbf,0xdf,0xef,
0xf7,0xfb,0xfd,0xfe,
0x00,0xff,0x00,0xff,
0x01};
unsigned char i;
void delay(void)
{
unsigned char m,n,s;
for(m=2;m>0;m--)
for(n=20;n>0;n--)
for(s=20;s>0;s--);
}
void main(void)
{
while(1)
{
if(table!=0x01)
{
P2=table;
i++;
delay();
}
else
{
i=0;
}
}
}
*博客内容为网友个人发布,仅代表博主个人观点,如有侵权请联系工作人员删除。