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.

HDC2010: Getting values of zero for temperature.

Part Number: HDC2010
Other Parts Discussed in Thread: MSP430FR5969,

Hello.

I have confirmed communications with the HDC2010 by reading both manufacturing ID registers.  I am now trying to read temperature using single byte methods shown in the MSP430FR26xx I2C examples.  I am receiving values of zero.  Is there something I am missing?

I have used the following steps:

0) Reset.  Check Mfg Id.

1) Write 0x0F (point to config register)

2) Write 0x01 (begin conversion)

3) Write 0x0F (continue pointing to config register)

4) Read value. (waiting for bit 0 to clear since the data sheet says this is a "Self-clearing bit when measurement completed")

Bit was cleared immediately so...

5) Write 0x00 (point to temp lsb)

6) Read one byte. 

7) Write 0x01 (point to temp msb)

8) Read one byte.

Below is a logic analyzer trace of the I2C bus. 

In this example, they used a timer to wait so I tried just waiting until the temperature values were non-zero.  That did not work.

http://www.ti.com/product/HDC2010/toolssoftware

I also read this post which seemed to describe the same issue I am seeing, although I am setting the conversion bit.  The handy flow chart seems to match what I am doing other than the timeout.

  • Dear Jason - after the command to start conversion - a waiting time is needed, and the time is based on how you have set the resolution. In this case, you sent a 0x01 to 0x0F (14 bit) so this would be ~1300uSec.  

    Here are two capture using the Saleae as you are. (please click on the images to see them larger)

    First one is putting part in AMM mode beforehand and using the DRDY pin - in my software I also read 0x04 and then use the fact that DRDY line is high and DRDY bit is set in the register to then go read the temp and humidity registers. 

    Here I am doing one shot conversion and just waiting (in this case ~2mSec) then going for the read. 

  • In addition to Josh's response, take a look at the source code for HDC2010METER-EVM. It uses the timer on MSP430FR5969 to put the MCU to sleep while waiting for the HDC2010 conversion time.

    Thanks,

    ren

  • Thanks Josh and Ren for your responses.

    Q1: I added a delay that should more than enough- about 30mS.  You can see the timing here between setting 0x0F, bit 0 start the conversion and the read:

    First I start the conversion:

    I wait 30ms and then read values of 0x00 for temperature LSB and MSB:

    Josh's examples using multi-byte reads and writes but I don't see anything logically different between his example and my results.

    Q2: Is the intent not to read 0x0F Bit 0 to know when an initiated measurement has been completed?  I understand that ideally one would sleep after commanding a measurement in the application but this is just a single read at power up as a test.

    Thanks for your help!

  • Jason -

    Try writing the pointer and the value together - here is a closer capture shot of that. 

    Then wait >1300uSec

    Then read out the bytes

    you can also read out 0x04 register before attempting to read out 0x00 to 0x03 registers - if its a 0x80, conversion was done and data is ready