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.

TMP1826: SCRATCHPAD-1 data with valid CRC but invalid contents

Part Number: TMP1826


Tool/software:

Hi,

I'm dealing with a communication issue with the TMP1826 chip. I believe the timing is correct, as the chip reset, device detection, as well as data writing and reading are all working. This is supported by the fact that when I read SCRATCHPAD-1, the CRC always matches. The problem is that the chip returns data which appears to be invalid. Below is the result of the READ SCRATCHPAD-1 operation (RESET, WRITE 0xcc, WRITE 0xbe, READ 9 bytes, check CRC):

[0] 0x43
[1] 0x80
[2] 0x0c
[3] 0xff
[4] 0x00
[5] 0x00
[6] 0x00
[7] 0xff
[8] 0x8e

Calculated CRC: 0x8e

Status reg (0x0c = 0b00001100):
ALERT_HIGH R/RC 0
ALERT_LOW R/RC 0
RESERVED R 00
DATA_READY RC 1
POWER_MODE R 1
ARB_DONE R 0
LOCK_STATUS R 0

Configuration-1 reg (0x00 = 0b00000000):
TEMP_FMT RW 0
RESERVED RW 0
CONV_TIME_SEL RW 0
ALERT_MODE RW 0
AVG_SEL RW 0
CONV_MODE_SEL RW 000

Access Type Codes:
R Read
RC Read to Clear
R-0 Read returns 0s
W Write
W0CP Write 0 to clear

TEMP: 0x8043 = 32835 = 0b1000000001000011

There are several things I don't understand:

  • Why do bits 5:4 (RESERVED) in the Status Register not have the value 1?
  • Why does bit 2 (POWER_MODE) have the value 1 when the chip is powered via VDD?
  • But most importantly: how do I convert the Temperature Register LSB and MSB (0x43 and 0x80) into a temperature in degrees Celsius?

The chip is on a PCB in a room at approximately 25 degrees Celsius. The Temperature Register sometimes reads values such as 0x8040, 0x8043, 0x8077, and so on. The values respond to warming and cooling of the chip.

I have two identical boards populated with the TMP1826 chip, and on both, the chip behaves similarly. The data read has a correct CRC, but it doesn't make sense.

I have read the datasheet, as well as application notes SBOA542 and SBAA588A, but I still can't work out what I'm doing wrong.

The chip is connected as follows:

There was no UART available when we decided to add the TMP1826 chip to the PCB, so I had to resort to bit-banging.

Thanks in advance for any advice!

- Ross

  • Hi Ross,

    The data is always transmitted least significant bit first. 

    If I reflect your data:

    0x43 => 0xc2
    0x80 => 0x01
    0x0c => 0x30
    0xff => 0xff
    0x00 => 0x00
    0x00 => 0x00
    0x00 => 0x00
    0xff => 0xff
    0x8e => 0x71

    The temperature data 0x01C2 translates to 28.125C and the CRC passes. Additionally, the DATA_READY and POWER_MODE bits that you asked about become the RESERVED bits that should always be high.

    thanks,

    ren

  • Hi Ren,

    Great catch! It was obvious from the start, but I couldn’t see the wood for the trees. The CRC looked fine, so I was sure the data was correct - but if all the bits are flipped, even the CRC is flipped, so…

    Thanks so much for your help!

    - Ross