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.

ADS1015 - how to read samples as fast as possible on I2C

Other Parts Discussed in Thread: ADS1015, ADS1014

Dear forum.

I am trying to use the ADS1015 and am reading data - however every so often (1 in 10) I receive data that is all 0xFF 0xFF instead of the expected (steady) voltage and a NAK is issued on the I2C.

I understand I need to wait the sampling time (1/3300 seconds ) for the fasted rate - I am using Bus Pirate and their I2C library to prototype this.

I am in continous convert mode - also I would expect the lower 4 bits to always be '0' but that is not always the case - I am concerned that I am reading the A/D when it is still converting.

Mm code is something like

write config word (0x42E0) to register 0x01

loop:

read CONVERT register (0x00)

wait (1/3300)

My question is - should I wait longer or is there a signal I could read (Bit 15 from CONFIG perhaps ) to see when to read - but that would increase my 

i2c read times - the i2c bus speed of bus pirate is not overly fast so I am trying to avoid accesses if I can.

All the best.

Boris.

  • Boris,


    Thank you for your question. I have few suggestions to try here:


    1. The device data rate can vary by as much as +/-10%. So, instead of giving a delay of (1/3300) sec, for a robust solution, we need to consider the worst case scenario of 10% more delay i.e. (1/(0.9*3300) delay. To be on the safe side, I would do (1/(0.89*3300)) sec delay.


    2. The ALERT/RDY pin (PIN 2) can also be configured as a conversion ready pin. To ensure that the conversion is complete, you can also consider polling on this ALERT/RDY pin. This is even a more efficient way because you can avoid unnecessary delays and maximize the throughput from the device. Please refer to the CONVERSION READY PIN (ADS1014/ADS1015 ONLY) section in the datasheet on how to configure this pin.


    Please let me know if you are still having issues in reading.


    Regards,

    Krunal