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 + ARM microcontroller

Other Parts Discussed in Thread: ADS1115

Good afternoon,

can anybody help me with some trouble I'm having with ADS1115IDGST. I can't read any value from it (I'm surprised about I can't getting value from config register what I set before). I'm using library for I2C bus, but I think that is working right because I have DAC on the same I2C bus also and I can communicate with it in both directions and values are correct.

I am using 100 kHz mode and 100 ns for falling and rising edges.

1. I write 10010000 and checking acknowledge (library have flag I2C_FLAG_TXIS)

2. I write 00000001 and checking acknowledge (by the same flag, this writing means by datasheet writing address of config register to pointer register)

3. Now I repeat start condition of I2C bus and sending address 10010000 and checking acknowledge

4. I write high byte of config register and checking acknowledge

5. I write low byte of config register and checking acknowledge

6. Now I sending stop condition

Here I insert some delay (approximately in ms)

7. Sending start condition

8. Sending address 10010000 and checking acknowledge

9. Sending byte 00000001 and checking acknowledge

10. I repeat start condition

11. Sending address 10010001 and checking acknowledge

12. Checking flag I2C_FLAG_RXNE (what means receiver buffer contains some received data)

But I freezes in the state 12, so the ADC doesn't send me any data from config register and not only from it (I have tried conversion register too). I am using the same flags with DAC and I received correct data, but ADS1115 not.

I have connected ADDR pin to the ground, on the SDA and SCL pins are 4k7 ohm pull-up resistors, ALERT/neg RDY I let unconnected, SDA and SCL in MCU are configured as open drain and output speed of theese pin are the lowest as can be (2MHz, but also there are 10MHz and 50MHz speeds).

I don't have any idea what I'm doing wrong, I have tried another piece of this ADC, I have tried sending stop after each transaction, and still having this trouble.

Best regards

Josef

  • Hi Josef,

    Welcome to the forum! Do you have scope or logic analyzer shots that you can send to me when communicating to the ADS1115?  In particular I need to see the portion step 10 through 12.

    Step 11 you issue the address and read device bits.  For step 12, are you sure you are sending SCL clocks from the controller?  The slave device will only send data in response to clocks sent from the master.  So what differs from the write cycle and the read cycle is the master will send data on the SDA line when writing, but when reading the data (following the address and read bits) the SDA line is not controlled by the controller.  The controller still needs to send the required clocks, and the only time the controller responds back to the slave on the SDA line is the ACK following each byte read.

    Best regards,
    Bob B

  • Thank you for your answer,

    I will upload some shots tomorrow. But now I tried once again, now I freezes in state 6, so it couldn't stop writing to config register.

    Best regards

    Josef

  • Good evening,

    problem is solved. It was caused, because I used USART to writing in states and USART transfer caused timeout at ADS1115.

    Thanks for your reply, but problem was not in ADS1115.

    Best regards

    Josef