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.

ADS7138: Reading value of analog in

Part Number: ADS7138

Tool/software:

I am using a nxp microcontroller to interface with the ADS7138 chip. I need to read the analog value at a selected analog in line at points during runtime in my code. I have attempted to read the analog in line using the READ op code but cannot communicate with the chip. I know the I2C interface for my code works on other devices but I have not been able to make it work for this chip. My logic is below:

Send the op code for reading to the chip address (0001 0000b, address for the chip is 0x10 - found using I2C scanner). 

Send the register address for the A0 line MSB to the chip (0xA1)

Attempt to read the value returned from the chip. 

Please let me know if I am missing any steps or if there is a configuration flag that needs to be set in one of the registers. Thanks!

  • Hi Nate,

    The I2C address for this device is set by the resistors at the ADDR pin. In your case, the ADDR pin is left floating and is disconnected from anything, so the address is 0x10.

    To read a conversion, you first have to select your channel through the MANUAL_CHID[3:0] in the CHANNEL_SEL (0x11) register. You can collect a conversion by setting the CNVST bit in the GENERAL_CFG (0x1) register high, or by providing a conversion read frame, described in Frame A of Figure 25 of the datasheet below. In the second case, the conversion is output to the I2C bus directly without reading a register. 

    Afterwards, you can read from the RECENT_CHx_MSB and RECENT_CHx_LSB registers to obtain the conversion. Let me know if this works for you!

    Regards,
    Joel