 #include<reg51.h>
#define uchar unsigned char
#define uint unsigned int
uchar code TB[]={0x01,0x02,0x04,0x08,0x10,0x20,0x40,0x80};
uchar code TA[]={0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, //空屏
 0xFD,0xFD,0xFD,0xFD,0xFD,0xFD,0xC1,0xFF, //L
 0xE3,0xDD,0xDD,0xDD,0xDD,0xDD,0xE3,0xFF, //O
 0xDD,0xDD,0xDD,0xDD,0xDD,0xEB,0xF7,0xFF, //V
 0xC1,0xFD,0xFD,0xC1,0xFD,0xFD,0xC1,0xFF, //E
 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, //空屏 
 };
 uchar i,t;
delay(uchar t)
{while (t--)
{;}}
void main(void)
{ uchar N,T;while(1)
 { for(N=0;N<40;N++)/*循环扫描一遍40帧（5个字每次显示要8帧=40）*/
  for(T=0;T<60;T++) //移动速度
  { 
  for(i=0;i<8;i++)
   { 
	  P2=~TB[i]; 
  P1=~TA[i+N]; 
   delay(100);
	   }
	    }
		 }}