ADUCM360
Recommended for New Designs
The ADuCM360 is a fully integrated, 3.9 kSPS, 24-bit data acquisition system that incorporates dual high performance, multichannel sigma-delta (S-?) analog...
Datasheet
ADUCM360 on Analog.com
in EVAL-CN0359-EB1Z Open source code , we want to change the adc1 to read the Internal Temp Sensor inside the ADUCM360 .
We do the changes in the below , But the code is not working. Temp value is coming so incorrect and with - Values ( Like -29 C , -17 C )
static int on_adc1(int argc, char *argv[])
{
float fVolts = (1.2 / 268435456); // Internal reference, calculate lsb size in volts
float fVoltage = (adc1_result * fVolts);// Calculate ADC result in volts
float internal_temperature = 25.0 - (((fVoltage * 1000.0) - 82.1) * 4.0);
pADI_ADC1->CON = (pADI_ADC1->CON & ~ADCCON_BUFBYPN_MSK & ~ADCCON_BUFBYPP_MSK & ~ADCCON_BUFPOWN_MSK & ~ADCCON_BUFPOWP_MSK & ~ADCCON_ADCCODE_MSK & ~ADCCON_ADCREF_MSK & ~ADCCON_ADCCN_MSK & ~ADCCON_ADCCP_MSK) | ADCCON_BUFBYPN | ADCCON_BUFBYPP | ADCCON_BUFPOWP | ADCCON_BUFPOWN | ADCCON_ADCCODE_INT | ADCCON_ADCREF_INTREF | ADCCON_ADCCN_TEMP | ADCCON_ADCCP_TEMP;
pADI_ADC1->ADCCFG = (pADI_ADC1->ADCCFG & ~ADCCFG_EXTBUF_MSK) | ADCCFG_EXTBUF_OFF;
pADI_ADC1->MDE = (pADI_ADC1->MDE & ~ADCMDE_PGA_MSK) | ADCMDE_PGA_G2;
pADI_ADC1->MSKI = (pADI_ADC1->MSKI & ~ADC1MSKI_RDY_MSK) | ADCMSKI_RDY_EN;
ADC1CON_ADCEN_BBA = true;
return 0;
}
Please help us to fix this problem.
Regards...
stephenv - Moved from Other Products (EN) to 8052 Core Products. Post date updated from Monday, March 16, 2020 8:45 AM UTC to Tuesday, February 3, 2026 9:03 PM UTC to reflect the move.
Any reply..?
Please need a support here guys. Thank you
It seems that the formula should be
float internal_temperature = 25.0 + (((fVoltage * 1000.0) - 82.1) * 4.0);
Also I suggest you calibrating the Vadc at 25'C firstly.