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.

ADS1118 single ended sampling and differential sampling mode

Other Parts Discussed in Thread: ADS1118

1 single ended sampling mode

     Between the two sampling, I need to do how much delay?

     During debugging, i found that the delay is less, after switch from one channel to another channel, the value of the sample is same to  the value which is sampled from  the previous channel.

2  about the differential sampling mode

     The full scale range and the size of the corresponding LSB as shown above.

    When the difference mode is used to sample the voltage  between two points, the voltage difference between the two points is 0.420V.

    When I change the rang  from the 6.144V range down to lower the scale, i found that  using the smaller range, the measured value would  far from the 0.420V, and even very far away from 0.420V. 

    I can not understand the point, so i need to pay attention to what when i use the differential sampling mode?

3  Can  you provide  differential sampling and single sampling code. 

  • Hi Zhilai,

    I will attempt to answer both questions 1 and 2 at the same time.  The ADS1118 always measures differentially even when measuring a single-ended input.  When measuring a single-ended input referenced to ground, you are only able to utilize 1/2 of the full-scale range and will only see the positive code values.  The LSB value is the same in both cases.  However, in the single-ended case you will only be able to have a maximum of 15 bits as you will only be able to measure 1/2 of the full-scale range. 

    When the mux is changed, the current conversion completes first before changing the mux channel.  It is possible that you are reading the result from the previous conversion even if you wait nearly the entire conversion period before reading the data.  This can happen as you do not know when the conversion actually started in the first place.  When cycling the mux, it is best to use the single-shot mode and monitor DOUT/DRDY for completion of the conversion.  In this way you can read out the data and write in the new configuration at the same time.  In this way you will know the actual start time for the conversion and when the conversion ends.

    If you use continuous conversion mode, then you should wait 2 conversion cycles before attempting to read the data. Remember that there is some variance in the oscillator, so you may need to wait slightly longer than 2 conversion periods.  It is really much easier to use single-shot conversion mode than to try to use continuous mode with timers and delays.

    As to LSB size, you need to always use the full-scale range setting for differential input and divide by the total available counts (2^16 - 1).  If you want to look at just single-ended then you need to take positive full-scale (1/2 of the full-scale range) and divide by 2^15.  Using either calculation the LSB size is the same.  So make sure you are using the correct calculation when you change ranges.

    We do not have a simple example code project, but there is an MSP430 project for the ADS1118 BoosterPack. You can go to that web page and download or go to:

    http://www.ti.com/lit/zip/sbac121

    Best regards,

    Bob B

  • Dear Bob B, thanks for your answer. About the question 2, i will test again, and then tell you the result.