Board logo

标题: 关于C8051F060 AD问题!??? [打印本页]

作者: sopher    时间: 2008-7-26 17:15     标题: 关于C8051F060 AD问题!???

ADC1转换老不完成是怎么回事啊??

程序一直在执行闪灯程序LedTempShine(5)

单步调试到AD1BUSY = 1时, 用IDE看ADC1CN值也不改变?


______________Initial.h_____________________
....

void ADC_Init()
{
SFRPAGE = ADC0_PAGE;
ADC0CF = 0xF0;
ADC0CN = 0xC0;

SFRPAGE = ADC1_PAGE;
ADC1CF = 0xF0;
ADC1CN = 0xC0;
}

void Voltage_Reference_Init()
{
SFRPAGE = ADC0_PAGE;
REF0CN = 0x03;
SFRPAGE = ADC1_PAGE;
REF1CN = 0x03;
SFRPAGE = ADC2_PAGE;//DAC Vref = 2.43 TYP. 1.2V*2
REF2CN = 0x03;
}
....

___________ADC_TEST.C__________

...

void main(void)
{
....

SFRPAGE = ADC1_PAGE;
AD1INT = 0;
AD1BUSY = 1;
while(!(AD1INT))
{

LedTempShine(5) ;
}

AD1INT = 0;
....
}





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