程序是刚做的,没测试过,你试试,能用再给分吧。P0口是位选,P2口段选。#includeunsignedintbittime=0;unsignedcharbitdisplay=0;unsignedcharmg=0,ms=0;unsignedcharTab[]={0xFC,0x60,0xDA,0xF2,0x66,0xB6,0xBE,0xE0,0xFE,0xF6,0xEE,0x3E,0x9C,0x7A,0x9E,0x8E,0x00};voidtimer0(void)interrupt1{TH0=0xF0;TL0=0x60;switch(bitdisplay){case0:P2=Tab[mg];P0=0xFE;break;case1:P2=Tab[ms];P0=0xFD;break;}bitdisplay++;bittime++;if(bitdisplay>=2)bitdisplay=0;if(bittime>=500){bittime=0;mg++;if(mg>9){mg=0;ms++;}if(ms>9)ms=0;}}voidmain(void){TMOD=0x01;TH0=0xF0;TL0=0x60;TR0=1;EA=1;while(1);}