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: Pseudocode of how to read multiple differential channels?

Part Number: ADS124S08


Hello TI,

A design I am working on utilizes the ADS124S08 part with 5 strain gauges, and I am trying to wrap my head around the operation of this ADC in firmware. A few things I am confused about:

1. What is the sequence for reading these 5 measurements? Can it be done in continuous mode?

2. Does the user have to switch channels in the code manually?

3. Is there pseudocode (or can someone provide pseudocode) to understand how an ADC should be utilized to read multiple channels simultaneously?

4. What can I expect in terms of the sampling speed of all 5 strain gauges? < 1 second, >5 seconds?

Apologies in advanced - I know some of these questions are board and vague, but I can't seem to figure out how this is done anywhere. Thanks for all guidance!

Michael

  • Hi Michael,

    Welcome to the E2E forum!

    1. What is the sequence for reading these 5 measurements? Can it be done in continuous mode?
    1. Configure the ADS124S08 to the desired configuration.
    2. Set to continuous conversion mode (default mode) and issue the START command. (This assumes that the START pin is held low.  If the START is high the device will automatically enter continuous conversion mode.
    3. WREG to the MUX input register the desired input channels. (Writing to the MUX register restarts the conversion.)
    4. Monitor DRDY and look for a high to low transition signaling the end of the conversion.
    5. WREG to the MUX input register for the next desired input channels. 
    6. Use the RDATA command to read out the last conversion result.
    7. Loop back to 4.

    This is not the only way to accomplish this as it is possible to read the conversion result direct at the same time as writing the next input channel (see Figure 92 in the ADS124S08 datasheet).  I thought the above would better explain the overall process.  Also note that the device is set to continuous mode.

    2. Does the user have to switch channels in the code manually?

    Yes, you will be required to change the muxed input channels manually in code.  There is no auto-sequencer for this device.

    3. Is there pseudocode (or can someone provide pseudocode) to understand how an ADC should be utilized to read multiple channels simultaneously?

    I basically gave the pseudocode above.  As the device is a single ADC with a muxed input there is no mechanism to simultaneously convert multiple channels.  In other words, one set of differential inputs at a time are converted.

    4. What can I expect in terms of the sampling speed of all 5 strain gauges? < 1 second, >5 seconds?

    The answer here would depend on the chosen data rate and the selected filter mode.  The fastest digital filter mode is the low-latency filter and to help filter power line-cycle noise it is best to use 20sps for 50/60 Hz rejection.  Table 13 in the ADS124S08 datasheet give the conversion times for the low-latency filter which is about 57ms per channel.  So it would take approximately 285ms to scan all 5 inputs at 20sps output data rate.

    TI recently released A Basic Guide to Bridge Measurements.  You may find this guide useful and in particular the circuit described in section 6.8 starting on page 69.

    Best regards,

    Bob B

  • Good morning Bob,

    Thank you so much for the knowledge. You've made my day! 

    Michael