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.

HDC1010: Issues regarding I2C interface

Part Number: HDC1010
Other Parts Discussed in Thread: ENERGIA, HDC1080

Interfacing HDC1010 with Xmega 128A1U via the I2C bus keeps giving NACK. The address used for write is 0x80 and reading is 0x81 as per the datasheet but there isn't any acknowledgement from the slave device (HDC1010).

  • Dear Radel - 

    If you can share your o'scope or logic analyzer captures along with your schematic (showing the pullup resistors, please), that will help us in assisting you - as you are OK with that address (0x40, 7 bit = 0x80, 8 bit) - the part should respond. 

  • Hi Josh,

    Thank you for taking the time to get back to us, we have been able to write data to the part but we are yet to read data from it. The schematic is similar to the application diagram provided on the datasheet and we are currently using the Xmega 128A1U as the master device.

    We would appreciate any insight you can provide on the same.

    Thank you

  • Dear Radel - 

    Please find attached a logic capture on the HDC10xx device, which includes reading out registers for determining date of manufacture, then does a start conversion, followed by reading out temp and %RH values at 1 second intervals.

    The viewer (free) can be downloaded from here: https://www.saleae.com/downloads/ 

    2656.HDC1080_Read out FB_FC_for_DoM_calc_then Read Temp Hum _1sec intervals.zip

  • Hi Josh,

    Thank you for your reply.

    We have interfaced the HDC1010 with Arduino and are able to read the manufacturing and device ID properly based of the slave address 0x40. The temperature and humidity values shown are inaccurate(temperature = -40 degree Celsius and RH=0.00%) .

    We would appreciate it if you could give us an insight into what exactly the address 0x40 corresponds to and how its related to 0x80 and 0x81 which happen to be the read and write addresses of the sensor as given by the datasheet.

    Thank you.

  • Dear Radel - 

    the 0x40 and 0x41 are 7 bit representations of what an I2C driver turns into an 8 bit value by inserting a bit at the end to indicate a read or a write, which shifts 0x40 to 0x80 (write) and 0x41 into a 0x81 (for a read). This is the way I2C works and is not unique to this device. 

    in the logic analyzer capture I shared with you, you will see an issuance of 0x80, 0x00 - which is a start conversion command (setting pointer to 0x00), followed by a waiting time of ~14mSec, followed by a readout of temperature and humidity registers (0x00 through 0x03), this sequence is then repeated every second, in that capture.

  • Thanks for your reply Josh. We have been able to successfully read the Manufacturer ID and device ID from the sensor but unfortunately the temperature and humidity values are at a constant of -40 degree-C and 0% humidity.

    We have currently switched over from the Xmega 128A1U to the Arduino Uno board but the results are the same. The connections are as per the datasheet and the DDRY pin is grounded as it is currently not used.

    Any insights on this would be of great assistance to us.

    Thank you

  • Dear Radel - 

    The MCU you are using should not make any difference for your issue. You should put a logic analyzer on your I2C lines, capture and share here for troubleshooting that. You can compare to the capture I sent earlier. For complete example which with slight mods that will run in Arduino, attached is Energia sketch for the HDC1010 (or HDC1080), which you can compare to your code and then hopefully repair.

    HDC1010__address_40.ino.zip

  • Hi Josh,

    Thanks for the Arduino sketch, we have taken a look at it and have finally got to read the temperature values from the IC but unfortunately the humidity data is still inaccurate and continues to return 99.99% continuously.

    We have the mode select bit of the configuration register set to 1 but the humidity read obtained is accurate only for the first read when the heater is also set to 1 else the humidity continues to give us an output of 99.99%.

    We would appreciate your insight.

    Thank You

  • You should put a logic analyzer on your I2C lines, capture and share here for troubleshooting that.