本人写了一个MCSDG128B的单个字符输出程序.但烧到FLASH后却总是不能运行。哪位大侠给指点一下?多谢了!!(源程序见下)
#include <hidef.h> /* common defines and macros */ #include <mc9s12dg128.h> /* derivative information */
#pragma LINK_INFO DERIVATIVE "mc9s12dg128b" extern char c;
//初始化SCI0子程序
initial_sci() { SCI0CR2=0X0C; SCI0BDH=0X00; SCI0BDL=0X9C;
}
//输出字符子程序
put_char(char c) { while ((SCI0SR1&0x80)==0); SCI0DRL=c; }
void main(void) { c=0x41; initial_sci(); put_char(c); }
|