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.

ADS112C04: Understanding the result of internal temperature sensor

Part Number: ADS112C04

Tool/software:

We got a custom board with two ADS112C04 connected to the same I2C Bus (address 0x40 and 0x45). Now we don't really understand the results we get from any of it so we thought it would be good to take as step back and try to read the internal temperature sensor first.

At the moment we are doing everything in a linux shell:

adr=0x45

# reset
i2cset -y 0 $adr 0x06 c

# Reg [0] will be ignored anyway
#i2cset -y 0 $adr 0x40 0x00 b

# Reg [1] - Continuous conversion mode and temperature sensor
i2cset -y 0 $adr 0x44 0x09 b

# Reg [2] - Data counter and integrity check with inverted data output
i2cset -y 0 $adr 0x48 0x50 b

# Reg [3] - no IDAC
#i2cset -y 0 $adr 0x4c 0x00 b

# print out all configuration registers
i2cdump -y -r 0x20-0x2F 0 $adr

# start
i2cset -y 0 $adr 0x08 c

# poll results
watch -n1 i2cget -y 0 $adr 0x10 i 6

The i2cdump outputs this, so we are certain that the registers are written correctly. To test this further we enabled/disabled data counter and the number of bytes in RDATA changed with it.

     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f    0123456789abcdef
20: 00 00 00 00 09 09 09 09 50 50 50 50 00 00 00 00    ....????PPPP....

The result of reading RDATA is

0xfd 0x0c 0x97 0x02 0xf3 0x68

[0] is the data counter, [3] is it's inverse value. It's counting upwards all the time, which is what we expect.

[1]/[2] is the temperature sensor value and [4]/[5] are the inverse values.

Our problem in understanding is, that 0x0c97 is (according to table 13) a value of 100.7 degrees celsius. We can touch the IC and it's definitely not that hot.

So we are obviously doing something wrong but we have no idea what. Can someone give us a clue on what our mistake could be please?

  • Hi Daniel,

    Temperature data are represented as a 14-bit effective result that is left-justified within the 16-bit conversion result. When reading the two data bytes, the first 14 bits (MSBs) are used to indicate the temperature measurement result. The LSBs of the data output do not indicate temperature. Only the 14 MSBs are relevant. One 14-bit LSB equals 0.03125°C

    This is specified in section "8.3.10 Temperature Sensor" of the data sheet.

    Our problem in understanding is, that 0x0c97 is (according to table 13) a value of 100.7 degrees celsius. We can touch the IC and it's definitely not that hot.

    This means that for a result of 0x0C97, (Binary 0000 1100 1001 0111), only the first 14-bits are used for the temperature conversion (Binary 0000 1100 1001 01).

    This converted to decimal code is '805' (rather than '3223' using all 16 bits).

    805 * 0.03125°C = 25.156°C

    Best Regards,

    Angel

  • Oh, that was a stupid mistake. Thank you very much for pointing that out.

    Best Regards,

    Daniel