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.

ADC reading error

Other Parts Discussed in Thread: CONTROLSUITE

Hello dear all,

I am using Delifo F28335 development kit. While I am trying to  process adc input signals, I  am facing two problems.

 1.  Without any external input signals, the adc registers read some values. I have already  called the adc calibration function(Adc_cal()). Again, ADC OFFTRIM   has been configured as  AdcRegs.ADCOFFTRIM.bit.OFFSET_TRIM =-80; Here is the  adc conversion  configuration  code and screen shoot of the reading attached with:

2)  Even when there is external input is given,  some times the reading goes above 4096...... Would you help me please? I really appreciate your response

  • Hi,

    When no input is given to ADC of F28335, the result would be floating ie random as you're observing. I would suggest you to use a well regulated DC supply input (0-3V) to ADC to check its accuracy.

    Regards,
    Gautam
  • Dear Gautam,

    Thank you  a lot for your immediate response.
    I did as you suggested me. But the problem remained the same.
    Even when there is power(1-3v), the result goes above 4095. I need help for this one also.
    Our application system really depends on the accuracy of ADC input results.
    Do  you have any other suggestion?
    Thank you very much
  • As Gauntum said, with no external input the ADC pins float, so you might read any value.

    Fikadu Degefa95 said:

    2)  Even when there is external input is given,  some times the reading goes above 4096...... Would you help me please? I really appreciate your response

    The ADCRESULTx registers you are reading are left justified, so looking at them as integers is going to exceed 4096.  See the F2833x TRM SPRU812a, p.45.
    Regards,
    David
  • In addition to David's comment, if you're referring ADC-Soc sample code from controlSuite that can be found here:
    C:\ti\controlSUITE\device_support\f2833x\v140\DSP2833x_examples_ccsv5\adc_soc

    ADC results are read in following way:

    Voltage1[ConversionCount] = AdcRegs.ADCRESULT0 >>4;
    Voltage2[ConversionCount] = AdcRegs.ADCRESULT1 >>4;

    Regards,
    Gautam
  • Dear Gautam,
    Thank you so much. your answer is perfect..... Do you have any solution for the floating values that come out without any adc input? Thank you for your genuine help.
  • You're Welcome!
    Do you have any solution for the floating values that come out without any adc input?

    That's not required. Only care you need to take is... ground the unused ADCs.

    Goodluck & Regards,
    Gautam