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?