我写了一段TC溢出中断 但是运行不进入中断函数 求解中
内部RC 8MHz
#include<iom16v.h>
#define uchar unsigned char
#define uint unsigned int
#include<macros.h>
//#include<intrinsics.h>
#pragma interrput_handler_Mmiao:9
void_Mmiao(void)
{
TCNT1H=0X85;
TCNT1L=0XEE;
PORTD=0XDE;
delay(50);
PORTD=0Xff;
delay(50);
}
void delay(uint mo)
{ uint i,j;
for(i=0;i<mo;i++)
for(j=0;j<600;j++);
}
void main()
{
DDRD=0XFF;
CLI();
TCNT1H=0X85;
TCNT1L=0XEE;
TCCR1A=0X00;
TCCR1B=0X04;
TIMSK=0X04;
SEI();
delay(1);
} |