AnsweredAssumed Answered

Error reading RTD ADuC7061MKZ

Question asked by olegmsg on Mar 8, 2011
Latest reply on Mar 15, 2011 by olegmsg

I put on ADuC7061MKZ board:
Rref0 = 2430.00 Ohms, Rref1 = 2430.90 Ohms

Rrtd0 = 99.01 Ohms,     Rrtd1 = 100.61 Ohms

 

initADC(){

 

// turn on excitation current source
IEXCON = BIT2 + BIT6 + BIT7;   // Excitation current = 400 uA, Enable Excitation Current Source0, Source1

 

ADCMSKI =  BIT1 + BIT0;    // Enable ADC0,ADC1 result ready interrupt source

 

ADCFLT = BIT15 + (0x3F<<8) + 31; // Fadc=3.7877Hz @ ADCCLK=512KHz, Chop on, averaging


ADC0CON = BIT15 + BIT10;   // Enable ADC0, Unipolar, ADC0/ADC1 (differential mode), internal reference, Gain = 1
ADC1CON = BIT15 + BIT11;   // Enable ADC1, Unipolar, ADC2/ADC3 (differential mode), internal reference, Gain = 1

 

ADCCFG = 0;

 

// Offest Self Calibration
ADCMDE  = BIT2 + BIT4 + BIT7;
while((ADCSTA & (BIT0 + BIT1)) != (BIT0 + BIT1)){} // Wait for Calibration routine to complete
   
// Gain Self Calibration
ADCMDE  = BIT0 + BIT2 + BIT4 + BIT7;
while((ADCSTA & (BIT0 + BIT1)) != (BIT0 + BIT1)){} // Wait for Calibration routine to complete

 

ADC0CON = BIT15 + BIT10 + (1<<4) + 2; // Enable ADC0, Unipolar, ADC0/ADC1 (differential mode), external reference, Gain = 4
ADC1CON = BIT15 + BIT11 + (2<<4) + 2; // Enable ADC1, Unipolar, ADC2/ADC3 (differential mode), external reference, Gain = 4


ADCMDE  = BIT0 + BIT7;  // Enable Continuous conversion mode, ADCCLK=512 KHz
//IRQEN = BIT10 + BIT11;  // Enable ADC0 and UART interrupts

 

}

 

After ADCs reading Rrtds calculation:

Rrtd0 = (float)ulGadc0Result * ((2430.00 /4.0) /0xFFFFFF);
Rrtd1 = (float)ulGadc1Result * ((2430.90 /4.0) /0xFFFFFF);

 

And I'have got result:

Rrtd0 = 99.49 Ohms (instead of 99.01 Ohms)

Rrtd1 = 100.32 Ohms (instead of 100.61 Ohms)

 

What could be wrong?

Outcomes