Other Parts Discussed in Thread: HDC1010
Working with the HDC2010,
Have found the current data sheet has write on the I2C com description when it should have read on page 16, Think table 4 and 5 should be:
Start, Slave Addr(W), Ack, Register Address, Ack, Start, Slave Addr(R), Ack, Data....
Anyway, More to the point I can cause a read command by writing 0x01 to Reg 0x0F, wait for a delay and get temperature data back.
Writing Slave Addr(W) and 0x00 which should be temperature LSB, then writing Slave Addr(R) and reading two bytes back i get what i believe is reg 0x00 and 0x01 which should be LSB and MSB in that order.
Reading the data sheet it says that this order should be MSB then LSB. Page 15 in section 7.5.4 "Note that register bytes are sent MSB first, followed by the LSB"
I know that the LSB is sent first as this is the value that changes readily not the MSB. I get a result similar to 0x3E LSB and 0x63 MSB when slightly heated with finger, and 0x60 LSB 0x63 MSB at room temperature.
Whats more is the data sheet says on page 17 that "(the 2 LSBs D1 and D0 are always 0)" which if true would mean that the MSB byte of the temperature data is being sent D0,D1,D2,D3,D4,D5,D6,D7
the MSB Temperature Register is shown as 7 6 5 4 3 2 1 0 and has TEMP[15:8] written underneath. Is this to say that D0 and D1 are 0 and 1 and TEMP[8]=D7 and TEMP[9]=D6 ?? very confusing.
The HDC1010 data sheet is slightly clearer however the chips are slightly different.
Besides all this, when using the LSB and MSB and joining them (MSB<<8 | LSB) and entering into the equation given we get a value that looks like temperature in deg C.
The biggest problem I am having is reading the Humidity Data. I always get a 0x00 0x00 in registers 0x02 and 0x03 regardless of how I read them.
I have tried reading them first after triggering the take sample register (reg 0x0F = data 0x01) but with the same result. I am ensuring that the chip is set to measure both temp and humidity and I have tried 10, 15 and 20ms delays to ensure the measurement has time to complete and prior to starting the measurement after powering the chip (Tstart).
Has anyone got any suggestions on why I am getting no humidity readings?