27,508
社区成员




count = 0;
while(1)
{
T32B1_DelaymMs(50); //定时0.05s
counter++;
Display(counter/10);
if(count >= 90)
count = 0;
}
void Timer0_ISR(void) interrupt 1
{
static tmp = 0;
TH0 = (65536 - 50000) / 256;
TL0 = (65536 - 50000) / 256;
Display(counter);
tmp++;
if (10 == tmp)
{
tmp = 0;
counter++;
}
}