为什么输出比较中断只进一次,以后就进不了??
#include /* common defines and macros */
#include /* derivative information */
#pragma LINK_INFO DERIVATIVE "mc9s12dg128b"
void main(void) {
DisableInterrupts;
DDRB=0xff;
PORTB=0xff;
TIOS=0x80;
TC7=64000;
TSCR2=0x0f;
TFLG1_C7F=1;
TIE=0x80;
TSCR1_TEN= 1;
for(;;) {EnableInterrupts;} /* wait forever */
/* please make sure that you never leave this function */
}
void interrupt Timer0(void){
TFLG1_C7F=1;
waittime++;
if(waittime==2) {
waittime=0;
PORTB =0xf0;
}
PORTB =0x0f;
} |