Board logo

标题: 程序没有执行 [打印本页]

作者: hlhfootball    时间: 2007-7-28 21:28     标题: 程序没有执行

#include <hidef.h>      /* common defines and macros */
#include <mc9s12dg128.h>     /* derivative information */
#pragma LINK_INFO DERIVATIVE "mc9s12dg128b"

#include"sci.c"

 

void main(void) {
 /* put your own code here */
unsigned int AdValue;

DDRB=0XFF;

EnableInterrupts;
 
ATD0CTL2=0X83; //Normal ATD functionality,
               //cause the associate CCF flag to clear automatically
ATD0CTL3=0X04;//Conversion Sequence Length IS 8 BIT,Continue conversion
ATD0CTL4=0X00;
ATD0CTL5=0X00;//10-bit / left justified / unsigned - bits 6-15
              //Single conversion sequence,Sample only one channel.AN0

SCI0Init();

while(ATD0STAT0_SCF) {
AdValue=ATD0DR0;

WritedataToSCI0(AdValue,2);
PORTB_BIT0!=PORTB_BIT0;
ATD0CTL5=0X00;

}
}

以上是我写的程序,但是它没进入while条件判断语句,能指点一下吗,谢谢!









[此贴子已经被作者于2007-7-28 21:28:04编辑过]






欢迎光临 电子技术论坛_中国专业的电子工程师学习交流社区-中电网技术论坛 (http://bbs.eccn.com/) Powered by Discuz! 7.0.0