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.

ADS1119: acquiring all 4 channels in continuous mode

Part Number: ADS1119

Hi,
I would like to read all the channels of ADS1119, so as I understand from the datasheet I need to cycle the mux by the configuration register.
My doubts are related to the time needed in order to write register and change channel, I will explain better:
I'm trying to achieve at list 90 SPS, which is the best option to do it?

1)
-set the ADC for 90 SPS, single shot

-set the mux for channel 0
-start conversion
-when DRDY calls, read the value from the register of channel 0
-set the mux for channel 1
-start conversione
-read data

And so on, then begin again the cycle

2)
-set the ADC for 330 SPS, continuous mode (and doesn't care of DRDY)
-set the mux for channel 0
-start conversion
-50 us delay

-set the mux for channel 0
-read the value from the register of channel 0
-set the mux for channel 1
-read data of channel 1

And so on, then begin again the cycle

3) same as 2), but setting 90 SPS and waiting for DRDY


Expanding the same question, is there an advised workflow for 2 devices on the same bus?

Thanks in advance,
Paride

  • Hi Paride,

    The total timing is going to be related to how many channels you are cycling on the mux, the time required to read all of the channel data, the I2C SCL clock speed you intend to operate with and if there are any other devices on the I2C bus that will also be communicating.

    The biggest issue when cycling through the mux is in determining when a conversion completes and what input channel you are actually reading back.  It is easier to know using single-shot mode as you start a conversion wait for the conversion to end, and read the conversion.  This is beneficial as I2C timing may not accurately reflect what is being read back when using continuous mode.  So I would recommend using single-shot mode and:

    1. Set the desired input channel
    2. Issue the START command
    3. Use the DRDY as an interrupt to retrieve the data using the RDATA command
    4. Go back to 1

    How fast you cycle through the mux will greatly depend on the SCL frequency being used and the data output rate selected.

    When adding a second ADS1119, this becomes more complicated.  Here I would use two separate  interrupts and setting a flag to determine when to read the data and setup the next conversion.

    1. Setup the desired input channel for device 1 and issue the START command
    2. Setup the desired input channel for device 2 and issue the START command
    3. Wait for the interrupt flag for device 1
    4. Wait for the interrupt flag for device 2
    5. Read the conversion for device 1
    6. Read the conversion for device 2
    7. Go back to 1

    Obviously there are variations for optimization, but this is the basic flow.

    Best regards,

    Bob B

  • Thank you.
    Actually, instead of using interrupt I have to use the DRDY bit, but I suppose is the same thing just slower.

    What data rate do you suggest to set in the ADC? Based on my understanding, the real data rate output depends on how fast is my master device could cycle all channels (obviously limited by the data rate of ADC).

    If it is true, I can set ADS1119 to the maximum data rate (1000 SPS) in order to minimize the conversion time (should  be about 1 ms + 0.25us for changing channel) and just cycle above the channels, knowing that the time for reading and writing the register is for sure > 1.5ms

  • Hi Paride,

    Everything depends on the speed of the I2C communication even more so than conversion time.  There is a huge difference between standard (100kHz), fast (400kHz) and fast+ (1MHz).  Then you need to consider the time to process the data after it is read.  So there is a lot more to the overall timing than just the output data rate of the ADC.  Using the 1000sps of the ADC and fast+ clock speeds for the conversion and reading of the result.  You also need to consider the processing time of the remaining portion of your processing loop.  You could alter what I stated previously to:

    1. Set the desired input channel
    2. Issue the START command
    3. Continue with your processing loop and process any previously take data.
    4. Check to see if the conversion is complete by reading the DRDY register bit and read data when available (or go back to 3 if not)
    5. Read the conversion data if it is ready
    6. Go back to 1

    Once this is working at 1000sps, you could try slower data rates to improve the noise and see if it fits within the timing window.

    Best regards,

    Bob B