void interrupt ISR(void)
{
if(T0IE&T0IF)
{
T0IF=0;
TMR0=0X09;
ledrefresh_flag++;
DigitTime++;
if(ledrefresh_flag == LedTime)//LedTime=100
{
ledrefresh_flag=0;
ledrefresh=1;
}
if(DigitTime == DIGITTIME)//DIGITTIME=1000
{
DigitTime=0;
DigitSym=1;
}
}
}
在watch里观察的ledrefresh_flag、DigitTime都是走到18就清零了。谁能说说是怎么回事? |