#pragma interrupt_handler Time_Control:15
void INT1_Init(void)
{
TCCR1B=0x00;
TCNT1H=0xFB;
TCNT1L=0xC8;
TCCR1A=0x00;
TCCR1B=0x05;
}
void Time_Control(void)
{
TCCR1B=0x00;
TCNT1H=0xFB;
TCNT1L=0xC8;
TCCR1B=0x05;
Time_Label=1;
}
上面是程序。我用定时计数器1 实现200ms的定时,溢出后改变Time_Label的值。可是用AVRStudio仿真时候,就是进不了这个中断。也就是说Time_Label的值不会改变。外部晶振用的是11.0592MHz。不知道为什么谁帮我看看吧?谢谢
|
|