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.

ADS122C04: fail to read back configuration register

Part Number: ADS122C04

Hi Sir,

My customer would like to read back configuration register 00h to 03h.

Customer fails to read back 00h and 01h but they can read back 02h and 03h data = 0x00.

Is there anything wrong? Any difference we should do when reading these registers?

Thank you.



  • Hi Allen,

    It would be helpful to actually see scope or logic analyzer shots of the communication.  I suspect that there is an issue related to the communication and the bytes transmitted.  I assume that the address pins are both tied to ground making the address 0x40. 

    When reading to the ADS122C04 registers the communication must first I2C write the RREG command along with the address of the register followed by an I2C read of the register data.  The process is <START><Address<<1 + nW = x80><ACK><RREG command + register location><ACK><repeated START><Address<<1 + R = x81><ACK><Register Data><ACK/NACK><STOP>

    Usually there are issues with sending the RREG command.  The RREG command is 0x20, but should also include the address of the register that is to be read.  The address value is left shifted by 2 and added to the RREG command.  For example:

    • Read Register 0 = 0x20
    • Read Register 1 = 0x24
    • Read Register 2 = 0x28
    • Read Register 3 = 0x2C

    Best regards,

    Bob B

  • Hi Bob,

    How to calculate the converted value of temperature?  My setup steps are as follows:

    //Configuration Register 1
    i2cset -f -y 3 0x40 0x44 0x01

    //Configuration Register 2 [IDAC[2:0]]
    i2cset -f -y 3 0x40 0x48 0x06

    //Configuration Register 3 (IDAC1 connected to AIN3)
    i2cset -f -y 3 0x40 0x4c 0x80

    /*Start or restart conversions command*/
    i2cset -f -y 3 0x40 0x08

    /*Read data command*/
    i2cget -f -y 3 0x40 0x10 w

    temp_AD = 0xd30f

    temp_AD >> 2 * 0.03125= temp

    temp = 422

  • Hi Eddie,

    There is the sensor you connect externally and the internal sensor of the ADC.  The internal sensor is what you appear to be trying to measure.  The code value returned when right shifted by 2 is 0x34c3 which is a negative temperature if you look at the ADS122C04 datasheet table 13 on page 30.

    I'm assume that the ADS122C04 should be reporting something closer to room temperature.  After issuing the START/SYNC command you must wait for the conversion to complete before attempting to read the data otherwise the RDATA command will return the previous conversion result.  How are you determining when to read the result?  Are you monitoring DRDY or using a timer?

    Best regards,

    Bob B

  • Hi Bob,

    Thank you for response.I think I know where the problem is.
    Another question, how to define ads1015 in the JSON file of OpenBMC entity-manager?
  • Hi Eddie,

    You will have to contact the open source community that supports OpenBMC and entity-manager.  Unfortunately we do not have any experience working with this platform and cannot give you any guidance.

    Best regards,

    Bob B