#include <reg52.h>
#include <function.h> //详见第六章第8讲
void
main()
{
LED_Init();
TMOD=0x09;
BEEP=0;
TR0=1;
BEEP=1;
delay_ms(30);
BEEP=0;
LedBuff[0]=LedChar[TL0%10];
LedBuff[1]=LedChar[(TL0/10)%10];
LedBuff[2]=LedChar[(TL0/100)%10];
LedBuff[3]=0x7F&LedChar[TH0%10];
LedBuff[4]=LedChar[(TH0/10)%10];
LedBuff[5]=LedChar[(TH0/100)%10];
while
(1)
{
SEG_Scan();
}
}