我写了一个AT90S8535的小程序,定时器1溢出中断,可是不进中断。
请高手指教,谢谢!
#include"io8535v.h"
#define uint unsigned int
#define uchar unsigned char
#pragma interrupt_handler timer1_isr:7
void timer1_isr()
{TCNT1=0;
PORTC^=0X01;
}
void main(void)
{uchar j;
MCUCR=0;
DDRA=0XFF;
DDRB=0X00;
DDRC=0XFF;
PORTC=0;
PORTB=0;
PORTA=0X0;
TIMSK=0X80;
TCCR1A=0;
TCNT1=0;
TCCR1B=0X01;
asm("sei");
while(1){;
}
} |