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.

HDC2080: Problem reading temperature and humidity values

Part Number: HDC2080

Hi, 

I'm following the document http://www.ti.com/lit/an/snaa312/snaa312.pdf to program the HDC2080 for a single acquisition in sensor controller studio (SCS).

When I run the program in SCS I obtain the values: 

Temperature=0;

Humidity=256;

I2cStatus=0x0001;

Can someone tell me if there are mistakes in the code?

  • Dear Jorge - 

    Are you writing a 0x00 to register 0x0F on line 15? if so, then i don't see where you are sending the 0x01 to the 0x0F register to start the measurement. 

    You may want to also follow the guide that you referred to completely, and start with clearing 0x0F, etc. (page 3 looks closest to what you are doing here i think)

    http://www.ti.com/lit/an/snaa312/snaa312.pdf

  • Hi Josh,

    I'm not writing 0x00 to the register 0x0F. I'm changing the pointer to the register 0x00 on line 15 and I send the 0x01 to the 0x0f register in the first lines of the execution code.

    don't agree?

    Thanks,

    Jorge 

  • ok - i see it now - thanks - so then the question is how long is the resulting delay from your fwDelayUs? 

    since you most likely are doing 14 bit, as i don't see you changing the default resolution - if you are not waiting long enough before reading out the temp and humidity, you might get values like that (would expect 0x00;s, seems like you are getting 0x00s and 0xFFs, since you converted, but you only reported half of the value maybe - that could be part of your issue as well - if you can capture what you are getting back over I2C directly with a logic analyzer it would be easier to see the error. 

    you should get back two bytes each for each type, so that would be 0x00 0x00 to 0xFF 0xFF (which would equate to 0d to 65536d)

    then to do the math for each type of reading, and you would get range from 0% to 99.998%RH and from -40C to 124.9975C