|
#include <reg51.h>
#define uchar unsigned char
#define uint unsigned int
#define out0 P0
#define out1 P2
void delay(uint j)
{
uchar i=250;
for(;j>0;j--)
{
while(--i);
i=100;
}
}
uchar code string[]=
{
//汉字“丁”的8乘8点阵列码
0xFF,0x01,0xEF,0xEF,0xEF,0xEF,0xEF,
0xEF,0xEF,0xE1,0xEF,0xEF,0xEF,0xEF,
};
void main()
{
uchar i,j,n;
while(1)
{
for(j=0;j<2;j++)
{
for(n=0;n<40;n++)
{
for(i=0;i<8;i++)
{
out1=i%8;
out0=string[i*2+j*32];
delay(4);
out0=0xff;
}
}
}
}
}
|
|