我的程序怎么进不了中断啊?中断向量也人、添加了相应的中断 #include "ST72_F_561J9.h" #define EnableInterrupts {_asm ("RIM");} void main(void) { unsigned char temp; /* Only to read registers */ T16CR1 = 0X00; T16CR1 |= 0x20; //timer overflow interruput T16CR2 = 0x00; //Fcpu/4 temp = T16CSR; temp = T16CLR; T16CSR &=(~0X40); /* Reset counter to 0xFFFC */ EnableInterrupts while(1); }
@interrupt void T16_IT_Routine(void) { unsigned char temp,i; temp = T16CSR; temp = T16CLR; for(i=0;i<500;i++) { ; } } |