标题:
[原创]
[打印本页]
作者:
vincent85
时间:
2008-2-28 15:49
标题:
[原创]
为什么输出比较中断只进一次,以后就进不了??
#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;
}
欢迎光临 电子技术论坛_中国专业的电子工程师学习交流社区-中电网技术论坛 (http://bbs.eccn.com/)
Powered by Discuz! 7.0.0