After many revisions trying to read Temp and Humidity I finally realized the specs are wrong and the data ready does not work.
Here is the code that does work. It is written in spin , a variant of object pascal, for the Parallax Propeller.
PUB ReadTempHumid(SCLPin,devAddr) : x | config 'x is returned config is local variable
DIRA[HDCdataReady]~ 'Set pin to input
x := 0
config := ReadRegister(HDCclockPin,i2cAddr,configReg)
if ((config << 3) >> 7) == 0
WriteConfig(SCLPin,devAddr,config |= %00010000_00000000)
i2c.Start(SCLPin)
i2c.Write(SCLPin, devAddr | Xmit)
i2c.Write(SCLPin, $00)
'wait for HDCdataReady to go low
' Repeat until INA[HDCdataReady] == 0 'never happens
repeat while i2c.Write(SCLPin, devAddr | Recv) == NAK
x += 1
waitcnt(5_000 +cnt) 'wait 1 ms loops 79 0r 80 times
temperature := (i2c.Read(SCLPin,ACK) << 8) 'write to global vars
temperature |= i2c.Read(SCLPin,ACK)
humidity := (i2c.Read(SCLPin,ACK) << 8)
humidity |= i2c.Read(SCLPin,NAK)
i2c.Stop(SCLPin)
I'll add C code when available