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.

ADS124S08: Issues with reading data from ADS124S08

Other Parts Discussed in Thread: ADS124S08

Hi Bryan,

I solve this but I got new problem. 

When I change the INMUX from AIN0 and AIN1 to AIN2 to AIN3, I got nothing.

Here is my steps;

I set the configuratıon like internal voltage, gain and INMUX AIN2 to AIN3, I can read the data. 

or I set the configuratıon like internal voltage, gain and INMUX AIN0 to AIN3, I can read the data.

However I set the configuration like gain and vref voltage to internal and read AIN0, AIN1 and then change the INMUX from AIN0 to AIN1 to AIN2 and AIN3, I can not read any data.

AIN0-AIN1 configuration (1st config)

AIN2-AIN3 configuration (2nd config)

I just changed gain and mux and send rdata command. If I read only 1 ADC channel like AIN0-AIN1 I can read it. Also same process for AIN2-AIN3 and I can read it. However, if I write the process like this, it is not working.

while()

{

- Set 1st config and send rdata

- Set 2nd config and send rdata 

}

  • Hi Emre ARSANACI,

    Can you explain what you mean by "you get nothing"? What is the ADC actually doing?

    Can you provide a scope capture of your data transaction similar to how you did for the previous troubleshooting? This was very helpful

    Please show the overall transaction as well as a close up of each individual transaction. Include DRDY, DIN, DOUT, SCLK and CS

    -Bryan

  • Hi Bryan,

    So when I try to read as I explained, I get 0.

  • Hi Emre ARSANACI,

    Thanks, can you provide the scope captures as well? If you try to read data too soon i.e. before DRDY drops low, the ADC will output all zeros

    -Bryan

  • Hi Bryan,

    Thanks for your quick response.

    When I try to read with RDATA command, should I check the DRDY?

    I will share the scope captures tomorrow.

  • Hi Emre ARSANACI,

    You should always check DRDY first before issuing the RDATA command. If new data is not ready, you should not be reading data, right?

    Typically you would use the DRDY pin as an input to your controller, then set up an interrupt in your controller that will alert the system to issue the RDATA command when a DRDY high-to-low transition occurs

    -Bryan

  • Hi Bryan,

    Yes, you are right, but with the RDATA command, don't we read the data in the holding register without worrying about synchronization?

    Can I read this holding data when I read it several times in while loop?

    I think I understand that because I changed the configuration, I keep trying to read the data before it is ready.

  • Hi Emre ARSANACI,

    Any time the digital filter is reset in the ADS124S08, the data contents are flushed as well. So when you issue the WREG command to change the input mux, the digital filter is reset (see the WREG section, 9.5.3.12, for a list of register writes that automatically reset the filter). Then if you read data before new data are available, the data will be all zeros. This is why you must use the DRDY pin to determine when new data are ready, and issue the RDATA command at that time. You can read back data multiple times within one DRDY frame however, as long as the the digital filter has not been reset.

    Note that this behavior is specific to this ADC, and other ADCs may behave differently

    -Bryan

  • Hi Bryan,

    Thank you for your support.

  • Hi Emre ARSANACI,

    I am glad we could help resolve your issue

    -Bryan