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.

LMP90100: Correct way to sample multiple channels using the LMP90100

Part Number: LMP90100

Hi,

When you configure the LMP90100 to scan multiple channels by setting CH_SCAN to 0x83 (multiple channels, starting from 0 with 3 as last channel, repeated), what is the correct way of knowing which channel was sampled when you read ADC_DOUTH, ADC_DOUTM, ADC_DOUTL? I see that the sample applications are also reading SENDIAG_FLAGS, which includes sampled channels, but does this guarantee that sampled channel doesn't change between read SENDIAG_FLAGS and reading ADC?

Is it possible to step forward to sample one channel at the time? If so, then how do you do that? Are there better methods than chaning the range in CH_SCAN?

  • Emil,


    The best way to know which channel is being sampled is to keep track of the conversion completions with DRDYB. For example, if your are using Multiple-Channels Continuous Scan starting from CH1 to CH4. You start the conversions, and after a time of 1/ODR passes by, the DRDYB should indicate that CH1 is ready. At that point, the data can be read and the SENDIAG flags should be set for CH1. During this time, the ADC is sampling CH2.

    After another time period of 1/ODR, the DRDYB indicates that the CH2 data is ready (and SENDIAG flags are set). At this point you can read the data or other flags. Every 1/ODR period a new data set are ready for a new channel. Data should not be read out asynchronously.

    I did find a post similar to yours in the forum. It covers some of the same topics that you're asking about. I believe that it also covers options if you can't read DRDYB. You can find it here:

    e2e.ti.com/.../1943186

    If you just want to read one channel at a time, you can set the scan mode to Single scan (ScanMode1) and then set the last channel and the first channel for conversion to the same desired conversion channel. This should force a single read for one channel. All of this is can be set with the CH_SCAN register.


    Joseph Wu