#pragma interrupt_handler TimeCountr0_Interrupt:20
void TimeCountr0_Interrupt(void)
{
//中断程序
}
T0中断后总是无法进入中断程序
void Timer0_Init(void)
{
TCCR0 = 0x0B; //64 division,8M/64,CTC Mode
TCNT0 = 0x00; //Clear Counter
OCR0 = 63; //125 * 64/8M = 1ms/1kHz
TIMSK |= 0x02; //Enable OCIE0 T0中断使能
TIFR |= 0x02; //Clear OCIF0 中断标志清零
SREG |= 0x80; //Enable Global Interrupt
}
T0初始化对吗?
哪位大侠能指点一下,万分感谢!