智能车制作

标题: 中断函数 有错吗? [打印本页]

作者: 月光下的约定    时间: 2013-4-9 20:58
标题: 中断函数 有错吗?
void interrupt 8 Timer0_ISR(void) //8为定时器通道0的中断标号
{
  unsigned int m,a=0;
  TFLG1_C0F=1;//清中断标志位
//DisableInterrupts;
m=TCNT;
  TC0=m+37500; //37500*2.67us=100ms定时时间
   a++;
   if(a=10)
   {
       a=0;
       waittime++;        
      if(waittime>=9999)
        {
           waittime=0;
        }
       i=waittime;
   
  }
    //EnableInterrupts;
}


我试了 只能进一次中断, 咋回事啊?    求  大神  !  助我

作者: ┾━┾澔    时间: 2013-8-5 17:29
没看懂 你要实现的功能




欢迎光临 智能车制作 (http://111.231.132.190/) Powered by Discuz! X3.2