#include<reg51.h>
#define uchar unsigned char
#define uint unsigned int
#define out0 P0
#define out2 P2
#define out1 P1
void delay(uint j)
{
uchar i=250;
for(;j>0;j--)
{
while(--i);
i=100;
}
}
uchar code string[]=
{
0x7F,0xFF,0x7F,0xFF,0x7F,0xFF,0x03,0xE0,0x7B,0xEF,0x7B,0xEF,0x7B,0xEF,0x03,0xE0,
0x7B,0xEF,0x7B,0xEF,0x7B,0xEF,0x03,0xE0,0x7B,0xAF,0x7F,0xBF,0x7F,0xBF,0xFF,0x80
0xFF,0xFF,0x01,0xE0,0xFF,0xF7,0xFF,0xFB,0xFF,0xFD,0x7F,0xFE,0x7F,0xFF,0x00,0x80,
0x7F,0xFF,0x7F,0xFF,0x7F,0xFF,0x7F,0xFF,0x7F,0xFF,0x7F,0xFF,0x5F,0xFF,0xBF,0xFF
0xF7,0xFB,0xF7,0xFB,0xF7,0xFB,0x37,0x80,0xC0,0xFB,0xF7,0xFB,0xF7,0xFB,0x57,0xC0,
0xE7,0xDE,0xF3,0xEE,0xF4,0xED,0xF7,0xF5,0xF7,0xFB,0xF7,0xF5,0x75,0xEE,0x9B,0x9F
0x7F,0xFF,0x7F,0xFB,0x7F,0xF7,0x7F,0xF7,0x01,0xC0,0x3F,0xFE,0x5F,0xFD,0x5F,0xFD,
0x6F,0xFB,0x77,0xF7,0x7B,0xEF,0x7D,0xDF,0x7E,0xBF,0x7F,0xFF,0x7F,0xFF,0x7F,0xFF
}
void main()
{
uchar i,j,n;
while(1)
{
for(j=0;j<4;j++)
{
for(n=0;n<40;n++)
{
for(i=0;i<16;i++)
{
out1=i%16;
out0=string[i*2+j*32];
out2=string[i*2+1+j*32];
delay(4);
out0=0xff;
out2=0xff;
}
}
}
}
}
谢谢
一周热门 更多>