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.

How to read multiple ADS1118

Other Parts Discussed in Thread: ADS1118

I am using ADS1118 for 32 single ended  data acquisition card. I am using 8 ADS1118 to get 32 single ended channels. We are using CS to select the ADS.

The approach is following. We select ADS1 using CS then configure it for channel 1 and make CS high, then same thing for ADS2 upto ADS8. Once all the ADSes

are configured for channel 1 we put delay of 1.2 ms and read channel 1 of all the ADS1118 one by one. Once this is finished we move on to channel 2 of all the ADSes and 

do the same thing. we are using continuous conversion with 860 SPS. The problem I am facing is it swaps the reading of ADS1 channel 1 to ADS1 channel 2. Other problem is

same data is displayed at ADS8's channel 1 and channel2.   Please help me out.

  • Kshitij,

    Welcome to the forum!  I see a lot of repetitive code.  The problem with coding this way is there can be a cut and paste errors.  The basic format appears to be ok, but I cannot see how you are defining the CS for each ADS1118 device.  Is it possible you have a cut and paste error for some of the CS for some of the channels where the CS is actually the same for some of them?

    Best regards,

    Bob B

  • HI bob

    may I delete my previous post or make it secret?

    I don't want it to be in open. thank u

  • Kshitij,

    I took out the sensitive material.  You can always open a private discussion with me by clicking on my avatar or going to my personal page and opening a discussion with me.  You should see that option on the upper right portion of my page.

    Best regards,

    Bob B

  • I am using one ADS118 to measure two signals in differential mode. One conversion should take 1.2 ms at 860 SPS. 

    But I am facing a problem. Like when I switch from one channel to on second channel I have to

    give delay around 2 ms to get the proper result else the readings get swapped. Please let me know

    what is the multiplexing frequency of ADS1118 between its differential channel. 

  • Kshitij,

    If you are using strictly timing delays you may have some issues as the internal oscillator can vary somewhat.  Another consideration is settling of the analog input.  The accuracy of the measurement will be determined by any input settling that is required due to the differences in voltage of the input signals applied.

    To answer your question more specifically, if you use an interrupt driven system you should be able to achieve very near 1.6ms assuming that the SCLK is at the maximum of 4MHz (32 clocks times 250ns = 8us.)  If using single-shot mode, there will also be a small time (10's of us) required to power up the device to start the measurement.  Using this method your data always follows your configuration.

    If operating in continuous conversion mode, the current conversion must complete before the configuration change takes effect.  This effectively doubles the time worst case (2.4ms) depending on when you write the data and when you expect the data to appear.  You need to wait the remainder of the conversion cycle currently taking place and another complete conversion cycle for the data after the mux change for valid data after the configuration change for the mux.  To achieve the maximum throughput you need to write the next mux configuration at every read.  This means you must stay in sync (every conversion result must be read) to be sure you know which result is being read out of the ADS1118. 

    To be absolutely sure of your data and get the fastest throughput, single shot mode is the best method.

    Best regards,

    Bob B