#include<reg52.h>
#define uint unsigned int
#define uchar unsigned char
uchar code table1[]=
{
0x00,0x32,0x49,0x45,0x45,0x45,0x7E,0x40,0x00,0x30,0x30,0x00,0x00,0x00,0x00,0x00,
};
uchar code table2[]=
{
0x01,0x02,0x04,0x08,0x10,0x20,0x40,0x80
};
void delay(uint z)
{
uint x;
for(x=0;x<z;x++);
}
void main()
{
uchar i=0,k,h;
uchar j=0;
P1=0;
while(1)
{
for(i=0;i<8;i++)
{
if(j==8)j=0;
P1=table2[j];
k=255-table1[i];
P3=k;
delay(900);
j++;
h++;
}
if(h==64)h=0;
if(h==8)j=0;
j++;
}
}
不知道是什么回事,竟然上传不了图片了。