AnsweredAssumed Answered

Different conversion results using ADC0 and ADC1

Question asked by Lars on Jun 6, 2011
Latest reply on Nov 26, 2012 by MMA

I am measuring the output of two pressure sensors (0-5V output divided down to ~ 0 - 1V using 2k/10k resistor divider) using ADC3 through the primary ADC and ADC4 through the auxiliary ADC, both in SE mode referenced to ADC5. Both ADCs are referenced to a 2.048V precision external reference, with the high reference bit set.    I notice I get significantly different results from the two converters.    With an input voltage of ~550 mV on ADC3 and ADC4 the output code for the primary ADC is ~6845000, and for the auxiliary ADC ~11698000.   Why are these so different?


Here is a code snippet for the ADC set up and conversion:


      //Set up ADCs for reading house keeping channels
        ADCFLT = 0x01 + BIT7 + BIT10;       //~500Hz + 4x Avg 2ms settling
        ADC0CON = BIT4 + BIT6 + BIT7 + BIT8 + BIT10 + BIT12 +BIT15;         // ADC3/5 Gain = 1, Unipolar, Ext High Ref
            ADC1CON = BIT2 + BIT4 + BIT8 + BIT9 + BIT11 + BIT12 + BIT15;      // ADC4/5 Gain = 1, Neg buffer bypass, unipolar, Ext High Ref
        ADCMDE = BIT1 + BIT7;   //start ADCs for single conversion
        while ((ADCSTA & (BIT0 + BIT1)) != (BIT0 + BIT1)){} // wait for data ready 
        ulADC3 = ADC0DAT; // read data and clear data ready flags
        ulADC4 = ADC1DAT;
        ADCMDE = BIT0 + BIT1 + BIT1;  // Put ADC system in idle mode