由于刚接触mc9s12dg128单片机,用的codewarrior4.6编程的,为了试验中断向量表问题,现编了几句小程序 主程序是: #include <hidef.h> /* common defines and macros */ #include <mc9s12dg128.h> /* derivative information */ #pragma LINK_INFO DERIVATIVE "mc9s12dg128b" void main(void) {
DisableInterrupts; DDRB=0xFF; PORTB=0x00; EnableInterrupts; for(;;) {} /* wait forever */
} #pragma CODE_SEG NON_BANKED void interrupt 6 DIRQISR(void) { PORTB=0x0F; } #pragma CODE_SEG DEFAULT .prm文件最后连接是: VECTOR 0 _Startup VECTOR 6 DIRQISR 编译后发现不进入中断,请教各位该如何解决?不胜感谢! |