#include unsigned char code tab[]={0x7f,0xbf,0xdf,0xef,0xf7,0xfb,0xfd,0xfe}; unsigned char code digittab[3][8]={{0x00,0x42,0x42,0x7e,0x42,0x42,0x00,0x00},// I {0x0c,0x12,0x22,0x44,0x22,0x12,0x0c,0x00},//love sign {0x00,0x3e,0x40,0x40,0x40,0x3e,0x00,0x00},};//u unsigned int time; unsigned char a,b; sbit Line=P1^3; sbit Row=P1^1; void main(void) { TMOD=0x01; TH0=(65536-3000)/256; TL0=(65536-3000)%256; TR0=1; ET0=1; EA=1; while(1) {;} } void t0(void) interrupt 1 using 0 { TH0=(65536-3000)/256; TL0=(65536-3000)%256; Row=1; P0=tab[a]; Row=0; Line=1; P0=digittab[b][a]; Line=0; a++; if(a==8) { a=0; } time++; if(time==233) { time=0; b++; if(b==3) { b=0; } } }