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.

LP-AM261: ADC Reading

Part Number: LP-AM261
Other Parts Discussed in Thread: SYSCONFIG

Tool/software:

Hi, I have some questions about ADC behavior that i noticed during my development and testing 

1.ADC pins reading shows a constant 4095 equivalent to 3.3v (ADC reference is internal) while no signals/wires are connected to it. Iam trying to read the data after one software forced conversion.It does not change or vary , i couldnt possibly tell whether something with 3.3v is connected to ADC pin or left unconnected , since iam getting same reading value when try to force a coversion .

2.If i do multiple coversions  continously in a loop for more than 12 times or more  the same reading are showing variation from that of the first conversion, in case of floating /no signal connected at ADC input iam gettting a varying value(which is expected from a non connected state) during bac to back conversion and a constant 4095 if read once.  Another scenario while giving input signal/voltage, the read value slightly changes while doing back to back conversion.  Is this behavior expected , why is it happening and what is the corrective measure?

3. While selecting my ADC clock as system clock , i configured ADCX_AIN0 as SOC0 and ADCx_AIN1 as SOC1,  i edited a sdk example code to read and print result of soc0  five times and then soc1 five times after conversion, the signal given to soc0 is reflecting in soc0 read results and SOC1 read results for about 2 to 3 times then it is corrected,. do u know why is happening., it only happens when ADC clock is selected as system clock.

  • Hey Adwaith,

    Thanks for reaching out here. Glad to help get you going.

    1) Please ensure that ADC clock is configured under the maximum of 66.67 MHz. Frequencies greater than this will affect the analog hardware timing of the ADC and result in erroneous operation/results. If ADCClk is configured as SYSClk (200MHz) without any divider, then nothing in the ADC will be working as expected.

    2) Assuming ADCCLK < 66.67MHz, what is the Sample&Hold/ACQPS settings while doing these conversions?

    3) Correct operation of the ADC assumes you have the proper ADC input signal conditioning circuitry to balance the electrical charge between the external components and the internal sampling capacitor(s). What equipment/tools are used to drive the input signal during testing?

    Best Regards,

    Zackary Fleenor

  • Hey Zackary,

    Thanks for the response,

    1) while i used a sysclk/3 or sysclk/5  iam getting a proper response, but still if no input signal/ no wires are connected it is still showing 4095 as read results which will change from 4095 to a lower value if i do the conversion in a loop for more than 12 times and read results, is it necessary/advisable to do multiple conversions to reach more accurate reading, i checked the pin with multimeter and there was no 3.3volt coming on the pin.

    2)I am using sample window as 19 sysclk counts.

    3)I am feeding signal from a voltage divider circuit which takes supply from launch pad itself, the readings are almost accurate like if given ground as input it will show a 7 or 10 (range 0 to 4095) may be due to slight voltage variations. I also had  tried with DAC as input signal but may be due to fast conversion or something, I was getting a PWM kind of effect, the results was switching between 0 and 4095 , I had ensured the DAC output with multimeter (2.0volts)

    4) a)My further confusions or doubts are, why it is giving me 4095 when i am not connecting anything to input pins , is it due to any high impedance or something?

        b)is it good to do a multiple conversion than a single conversion before reading result

        c) If I use DAC on launch pad as input source, is there any particular configuration on ADC to follow

       Pls do point me to the correct configurations and method which gives the best results

    Thanks for pointing out the desired frequency of ADC clock.

  • Hey Adwaith,

    Glad we were able to address part of the issue.

    A few follow up questions to help us further:

    1) Has the ADC been running prior to the first sample?

    2) Can you insert a 500 microsecond delay after the ADC is enabled before attempting the first read?

    We believe there is a pre-set condition that will cause the first sample to be 4095 while the input is floating when the ADC is enabled. After some time, the readings will become more random like you've seen. Dedicated testing for floating input isn't done at the design level, but the Open-Short Detection (OSD) circuitry was added for this exact reason, to determine if a given ADC channel is Shorted or Open (Floating).

    3) As an experiment, can you try running a few samples on a driven channel, then sample a floating channel (without disabling the ADC). This should help to mitigate the initial ADC settling error mentioned above.

    Best Regards,

    Zackary Fleenor

  • Hey Zackary

    1)Yes , ADC was enabled and given 500 microsecond before trying to do any conversion, I used the sysConfig generated code, in that there is a delay of 500 microseconds already available

    2) a) I have already tried the same experimental method that you suggested, during testing I have given signal as input for some time, during that time it                   gives a value say 1170, as soon as i remove the wire from the launch pad read value shoots back to 4095,

        b)This scenario of floating sample fixed to 4095 is happening when i tried to do a conversion for one time and read result even if have a valid signal given           previously and removed it. If i forced the conversion with no signal attached (say a 15 - 20 times)  and then only after that I read result , the value varies           from 4095 to some 3990 or 4000

       c)One more observation is if i keep the wire attached to the launch pad and remove the wire from signal source, then it is giving a random values as                     expected , maybe the wire attached with loose end may vary it some how due to its negligible capcitance or resistance.

          One doubt - Should it be like even if wire is not attached then also it should give a random value as a result?

    Thanks for the continued support :)

         

  • Yes, it is impossible to determine the initial conditions and electrical parameters of a floating ADC input. A hanging wire will couple in more noise from the environment than just the pin stub without any connection, which would lead to more erratic readings. As mentioned before, the concept/expectation of measuring a floating input was meant to be circumvented through use of the OSD circuitry.

    Best Regards,

    Zackary Fleenor