#includereg52.h#defineucharunsignedcharucharsaomiao[]={0xFE,0xFD,0xFB,0xF7,0xef,0xdf,0xbf,0x7f};//扫描ucharxianshi1[]={0x44,0x7e,0x40,0x08,0x0c,0x7e,0x08,0x00};//14ucharxianshi2[]={0x00,0x1e,0x1a,0x7f,0x5a,0x5e,0x60,0x00};//电ucharxianshi3[]={0x00,0x08,0x4a,0x9a,0x6e,0x0a,0x08,0x00};//子voiddelay()//定义延时函数{inti;for(i=0;i50;i++);}voidmain()//主函数{inti,j;P0=0;P2=0;for(j=0;j50;j++)//显示“14”{for(i=0;i8;i++){P2=saomiao[i];P0=xianshi1[i];delay();}}for(j=0;j50;j++)//显示“电”{for(i=0;i8;i++){P2=saomiao[i];P0=xianshi2[i];delay();}}for(j=0;j50;j++)//显示“子”{for(i=0;i8;i++){P2=saomiao[i];P0=xianshi3[i];delay();}}}