Trouble reading from LTC2497

I have a custom hardware based on ESP32 connected with LTC2497 along with some other sensors on the I2C Bus. I am using Arduino IDE to program ESP32 to access this ADC.

I have a converted Linduino example code downloaded from LTC2497 Product Support page:

This is the code example i have written in Arduino IDE (LTC2490.ino).

I am trying to read Channel 0 in single ended mode. But i always endup reading 0 in the adc_code variable.

Here is a capture of i2c data through a logic analyzer:

Kindly let me know if i am missing something while trying to reach channel 0 of this ADC. Also let me know if i can find any working LT2497 ADC example for Arduino?

Thank you


Parents Reply Children
  • 0
    •  Analog Employees 
    on Aug 7, 2020 5:16 PM 8 months ago in reply to asimlink

    I happened to be browsing for Linduino topics and came across this, apologies for the delay. The most common explanation is that the LTC2497 is still converting - it will not ACK. You really need to follow the Linduino library functions exactly - they take care of timing, waiting for conversions to end at the right time, etc. The most common misconception with these parts is that you can program a channel in one transaction followed by a stop condition, then read a conversion result right away - this is not correct and you will always get NACKs because any stop condition after any valid transaction will trigger a new conversion.

    To summarize, if you want to scan a bunch of channels, you do NOT have to waste conversions to switch a channel, you just have to keep track of where you are in the sequence. For each transaction, you do the following:

    Write the channel configuration for the conversion that is about to begin

    repeat start

    read out the data for the conversion that has just finished.

    stop (which will trigger a new conversion.)