2005-07-13 08:02 PM
2005-07-13 12:32 AM
Hello
I use a ST10F276 and Keil. I have configure my ST10 like the ST10F269. Here you can see my configuration. the IT_mesures_analogiques run every 500us. ADCIC = (14<SRCP0 = (int)(&ADDAT); ADCIE = 1; NB_ADCCH = 1; ADC_0 = 0; void IT_adc (void) interrupt ad_trap using registres_ad_trap { value_0 = adc_value[NB_ADCCH-1-ADC_0]; } void IT_mesures_analogiques (void) interrupt t6_trap using registres_t6_trap { ADCON = (0x0020|(NB_ADCCH-1)); // Auto scan // single conversion of NB_ADCCH channel DSTP0 = _sof_(adc_value); PECC0 = 0x0200|NB_ADCCH; ADST = 1; // ADC start bit } I have 3 problems : 1.With this configuration I have the ad interrupt but the value_0 = 0 between 0Volt and 5 Volt. 2.If I add 1 channel : NB_ADCCH = 2; ADC_0 = 0; ADC_0 = 1; I have i watch dog interrupt and a reset. 3.the 3rd problem is how to do to have an uto scan single conversion of 24 channels (16 ADC + 8 XADC). Thank you.