我买的是M68KIT912DP256的评估板,编了一个SCI的程序,怎么都调不通,请问什么问题,我的程序如下: #include <hidef.h> /* common defines and macros */ #include <mc9s12dp256.h> /* derivative information */
#pragma LINK_INFO DERIVATIVE "mc9s12dp256b"
void main(void) { /* put your own code here */ int i; SCI1BDL = 0x34; //设置波特率为19200 SCI1CR1 = 0x00; //设置8位数据格式,关闭循环模式与奇偶校验 SCI1CR2 = 0x08; //禁止中断,允许发送 TSCR1_TEN = 0x01; for(i=0;i<10;i++) { SCI1DRL = 20; do{; } while(SCI1SR1_TDRE == 0); SCI1SR1_TDRE = 0; } //EnableInterrupts; /* wait forever */ } 各位大虾能看看什么问题吗?谢谢 |