#includereg52.h#includestdio.hunsignedcharcodeled[]={0x3F,0x06,0x5B,0x4F,0x66,0x6D,0x7D,0x07,0x7F,0x6F,0x77,0x7C,0x39,0x5E,0x79,0x71};unsignedcharcodeanjian[]={0xEE,0xDE,0xbe,0x7e,0xed,0xdd,0xbd,0x7d,0xeb,0xdb,0xbb,0x7b,0xe7,0xd7,0xb7,0x77};inta;unsignedchartemp,temp1,temp2;voidmain(){P0=0;while(1){P2=0xf0;temp=P2;if(temp!=0xf0){P2=0xf0;temp=P2;P2=0x0f;temp1=P2;temp2=temp|temp1;for(a=0;a16;a++){if(temp2==anjian[a]){P0=led[a];break;}}}}}