- UID
- 523163
- 性别
- 男
|
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; .... }
|
|