用060内部集成的16位ADC,单步运行的结果都是正确的,可是全速运行结果不是0就是ffff。请问各位高手是什么问题呢?ADC转换的代码如下: void ADC_Init(void) {char SFRPAGE_SAVE=SFRPAGE; SFRPAGE=ADC0_PAGE;
AMX0SL=0x00; REF0CN=0x03; ADC0CF=0x80; ADC0CN=0x80;
SFRPAGE=SFRPAGE_SAVE; }
void ADC_Convert(void) { char SFRPAGE_SAVE=SFRPAGE; SFRPAGE=ADC0_PAGE;
AD0INT=0;
AD0BUSY=1;
while(!AD0INT) {j++;}
adc_temp=ADC0H; adc_temp=adc_temp*256+ADC0L; result=adc_temp;
SFRPAGE=SFRPAGE_SAVE; } |