#include<reg52.h>
#define uchar unsigned char
#define uint unsigned int
code uchar TAB[]={1,1,1,1,1,1,1,1,
0x81,0xe7,0xe7,0xe7,0xe7,0xe7,0xe7,0x81,0, //"I"字
0x99,0x00,0x00,0x00,0x00,0x81,0xC3,0xE7,0, //"紅心"
0x99,0x99,0x99,0x99,0x99,0x99,0xc3,0xe7, //"U字
1,1,1,1,1,1,1,1};
uchar j=0,m=0;
void delay(uint z)
{
uint x,y;
for(x=z;x>0;x--)
for(y=125;y>0;y--);
}
void xianshi_hs()
{ uchar i=0;
P1=0x01;
for(i=0;i<8;i++)
{
P0=TAB[i+j] ;
delay(2);
P1<<=1;
}
}
int_intt0() interrupt 1
{
TH0=(65536-50000)/256;
TL0=(65536-50000)%256;
m++;
if(m==3)
{
m=0;
j++;
if(34==j)
{
j=0;
}
}
}
void main()
{
TMOD=0x01;
TH0=(65536-50000)/256;
TL0=(65536-50000)%256;
EA=1;
ET0=1;
TR0=1;
while(1)
{
xianshi_hs();
}
}