This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

RM48L952ZWT ADC Conversion

Other Parts Discussed in Thread: HALCOGEN, RM48L952

Hi. We are using the RM48L952ZWT Hercules. and our readings do not seem accurate according to the equation with data resolution set in HalCoGen to 12 bit.

equation  (ADC_Pin_Value_Volts/VREF_ADC) * (4095)

1. Is VREF_ADC on the RM48L952 connected to Terminal V15 (VREFHI) which we measure with voltmeter = 3V. Or is VREF_ADC connected to another terminal i.e., Vdd)? There is no option in HalCoGen to specify what VREF_ADC should be connected to, etc.

2. So if ADC_Pin_Value in Volts is measured by voltmeter = 1.975V and Terminal V15(what we assume is VREF_ADC) = 3V then given the equation the reading = 2696, but our reading using HalCoGen getting the adc single data function (the return value in code below)  after conversion is 3936 (really off).  Is there additional configuration we need to do in HalCoGen so the ADC conversions are accurate, if our assumptions above correct?

adcData_t adc_data;

adcData_t *adc_data_ptr = &adc_data;

/** - Start Group ADC Conversion

*/

adcStartConversion_SelChn(adcRegister, adcPin, 1, adcGroup);

/** - Wait for ADC Group conversion to complete */

while(!adcIsConversionComplete(adcRegister, adcGroup));

/** - Read the conversion result

*/

adcGetSingleData(adcRegister, adcGroup, adc_data_ptr);

return(adc_data_ptr->value);

Thank You Again.

  • Hi Tammy,

    I have forwarded your question to one of our ADC experts. They should reply to your question soon.
  • Hi Tammy,

    What is the conversion group's sampling time configured to be? The default sampling time is 200ns, which may not be sufficient depending on the external circuit driving the input channel. See this application note for more information on actual samplig/settling time depending on the external R-C circuit:
    www.ti.com/.../spna061.pdf

    Regards,
    Sunil
  • Hi Thank you.

    Yes you are correct sample time = 200

    (Our configuration in HalCoGen)

    FIFO size = 1
    Data Resolution = 12 bit
    Sample Capacity Discharge is disabled
    Discharge time = 0
    Cycle time = 100
    Discharge prescaler = 0
    tDscharge = 0
    Dample time = 200
    Cyce time = 100
    Sample prescaler = 0
    tSample = 200
    tScanTotal = 400
    tExtenden = 200
    tConversion = 1.300
    tTotal(usec) 13.900000

    You wrote that 200ns default may be the wrong setting for the Hercules RM48L952ZWT(when creating the HalCoGen project we selected the RM48) . How do we know what setting it should be for this variant? Thank you again.
  • Hi Tammy,

    The actual amount of sampling time required depends on the nature of the driver circuit, and not on the variant of the MCU. How are you generating the 1.975V on the analog input channel? The app note that I had referenced walks you through the details on how to determine the actual sampling time you need depending on this external circuit characteristics.

    If you want to get empirical data, you can increase the sampling time in HALCoGen until you get more accurate conversion results.

    Regards,
    Sunil