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: Hdc2080 not working with pic16f18323

Part Number: HDC2080


I am using hdc2080 by connecting with pic16f18323. I initialized by loading registers 0x07, 0x0e and 0x0f with values 0x80, 0x46 and 0x00. Then loaded 0x0f register with value 0xa1 to start. After that i am getting interrupt in every 5sec, but when reading registers from 0x00 to 0x03, I am getting all 0xff. I am using i2c of pic16f18323, and before I had used htu21d sensor successfully. When I tried triggered method, not getting interrupt after loading 0x0f register with value 0xa1. Please help me to solve this issue.

  • Dear Ratheesh - 

    0x1A is not valid setting for 0x0F that would result in starting a measurement conversion, hence the reason you are not getting measurement results.

    For 11 bit temp and humidity results, please try 0x51 in 0x0F. Then expect to wait typically at least 750uSec before data is ready to read. You can also check Register 4 to be 0x80 when data is ready as well as use the DRDY/INT line.

  • Dear Josh

    Thank you for your answer. 

    I am not using 0x1A for 0x0f, I am using 0xA1 to get 9 bit resolution for temperature and humidity, also I tried with 0x51 and the result is same.

    I soldered the sensor with soldering iron, will it cause the sensor to get malfunction. 

    I2C write transactions used are, START,ADDRESS(0x80), ACK from Sensor, register address,ACK from Sensor,register value, STOP

    I2C read transactions used are, START,ADDRESS(0x80), ACK from Sensor, 0x00, STOP

    START,ADDRESS(0x81),ACK from Sensor,first data, ACK by MCU, second data, ACK by MCU, third data, ACK by MCU, fourth data, NACK by MCU, STOP

    regards 

    Ratheesh

  • Ratheesh - 

    Please double check with scope or logic analyzer that you are seeing (click on image to enlarge): 

    also, hand soldering the device is not recommended. What was temp of the iron? Did you use no clean flux? Did you cover the part with polyimide tape before soldering? How will the DAP be connected?

  • Hello Josh

    Thank you for your help, my i2c reading program was not doing well and I solved it. Now it is reading temperature and humidity.

    Regards

    Ratheesh