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.

ADS1115: help configure registers

Part Number: ADS1115


Hello everyone
I am writing to you because I have some questions about the ads1115, I suggest that I use continuous sample configuration and I read AN0 regularly, but I would like to switch to the one-shot configuration to read 3-channel Single-Ended.
what I do not understand is how to properly set registers, how to run a single sample to the ADC, and how to discern the 3 samples so they do not mix them.
I've read the manual and various forums but did not find anything that helps me
I hope you can do it
thank you

  • Massimo,


    Getting three single-shot conversions from the ADS1115 should be relatively easy. Note that single-shot conversion mode is the default configuration for the device. Let's just take an example where we make three different readings from the devices, with FSR=±2.048, single-shot mode, and DR=128SPS (these settings are default).

    The three readings have different mux settings (these settings are not default):
    1. MUX[2:0]=100 : AINP=AIN0 and AINN=GND
    2. MUX[2:0]=101 : AINP=AIN1 and AINN=GND
    3. MUX[2:0]=110 : AINP=AIN2 and AINN=GND

    After power-up, the default Config Register setting is 8583h, which is different than any of the settings above. To start conversions, you need to both set the MUX to the proper input, and start a single conversion. To do this write 1 to the OS bit and 100 to MUX[2:0]. You can do this in one write to the register.

    For the first conversion, write to the Config Register - C583h. This should start the first conversion. Since the data rate is 128SPS, wait 7.81ms+10% for clock variance. After 8.6ms read from the Conversion Register. The wait of 8.6ms should ensure the conversion has completed.

    Then you can start on the second conversion. You'll need to set 1 for the OS bit and 101 to MUX[2:0]. This means writing D583h to the Config Register. Wait for the 8.6ms and read the Conversion Register.

    For the third conversion, you need to write E583h to the Config Register. Wait 8.6ms and then read from the Conversion Register.

    In the datasheet Figures 30 and 31 show how to read and write to the device in detail.

    Hopefully this explains how to get the three readings, if you need to set different full-scale settings or data rate, you should be able to change the config register writes to change the device setting.

    If you have any other questions or if this explanation isn't enough, feel free to post back.


    Joseph Wu
  • Hi Joseph
    I tested the operation of the other inputs and it works fine
    I wanted to ask you
    The register DATA RATE is set to 128 SPS, means that the converter performs 128 samples and then makes a media ?

    thanks

  • Massimo,


    I was going back through some of my older posts, and I'm sorry that I missed this follow up question.

    The DATA RATE set to 128 SPS just means that typically, the ADC will put out a new data at a rate of 128 samples per second. That's the equivalent of about 7.8 ms for each conversion. If you have any follow up questions, or if I've misunderstood your last post feel free to post back.


    Joseph Wu