2、52.h>#defineunchunsignedchar#defineunitunsignedintsbitOE=P1^1;sbitLE=P1^0;unchcodeHH[8][2]={{0x01,0xff},{0x02,0x99},{0x04,0x66},{0x08,0x7e},{0x10,0x7e},{0x20,0xbd},{0x40,0xdb},{0x80,0xe7}};//空心unchcodeFH[8][2]={{0x01,0xff},{0x02,0x99},{0x04,0x00},{0x08,0x00},{0x10,0x00},{0x20,0
3、x81},{0x40,0xc3},{0x80,0xe7}};//实心unchcodecharbir[4][8][2]={{{0x01,0x80},{0x02,0xf7},{0x04,0xc3},{0x08,0x77},{0x10,0x81},{0x20,0xd7},{0x40,0xd7},{0x80,0xff}},{{0x01,0x81},{0x02,0xbd},{0x04,0xbd},{0x08,0x85},{0x10,0xbd},{0x20,0xbd},{0x40,0x81},{0x80,0xff}},{{0x01,0x9d},{0x02,0xa
4、b},{0x04,0xa7},{0x08,0x00},{0x10,0x15},{0x20,0xa1},{0x40,0xb7},{0x80,0xb7}},{{0x01,0xe7},{0x02,0x56},{0x04,0xb5},{0x08,0xf7},{0x10,0x81},{0x20,0xb7},{0x40,0xbf},{0x80,0xc3}}};unchtable1[8]={254,252,248,240,224,192,128,0},table2[8]={0,1,3,7,15,31,63,127};/*延时函数*/voiddelay(unitxm
5、s){uniti,j;for(i=xms;i>0;i--)for(j=110;j>0;j--);}voidmain(){uniti,j,k,l,t;while(1){OE=0;for(t=0;t<=3;t++){for(j=0;j<=7;j++){for(k=30;k>0;k--)for(i=0;i<=7;i++){LE=0;P0=charbir[t][i][0];P2=(charbir[t][i][1]>>(7-j)
6、table1[j]);LE=1;if(j!=7)delay(1);}}for(j=0;j<=7;j++){for(k=30;k>0;
7、k--)for(i=0;i<=7;i++){LE=0;P0=charbir[t][i][0];P2=(charbir[t][i][1]<8、(table2[j]);LE=1;if(j!=7)delay(1);}}}for(l=4;l>0;l--){for(k=60;k>0;k--)for(i=0;i<=7;i++){LE=0;P0=HH[7-i][0];P2=HH[i][1];LE=1;delay(1);}for(k=100;k>0;k--)for(i=0;i<=7;i++){LE=0;P0=FH[7-i][0];P2=FH[i][1];LE=1
9、;delay(1);}}}}