Conversion of signal outputs HTU21D Need help again please
Posted: Mon Aug 08, 2022 3:10 pm
Hello
I have the sensor returning the two Bytes correctly I think but can't figure out how to put this calculation into the box.
Also how to set the last 2 bits of the LSB to zero. Would I just shift the number left twice.
I think I need to do some shifting to add the two bytes together, not just had them up.
CONVERSION OF SIGNAL OUTPUTS
Default resolution is set to 12-bit relative humidity and 14-bit temperature readings. Measured data are
transferred in two byte packages, i.e. in frames of 8-bit length where the most significant bit (MSB) is transferred
first (left aligned). Each byte is followed by an acknowledge bit. The two status bits, the last bits of LSB, must be
set to ‘0’ before calculating physical values.
Thanks very much for any help.
I expect it child's play to you lads
All the best
Mark
I have the sensor returning the two Bytes correctly I think but can't figure out how to put this calculation into the box.
Also how to set the last 2 bits of the LSB to zero. Would I just shift the number left twice.
I think I need to do some shifting to add the two bytes together, not just had them up.
CONVERSION OF SIGNAL OUTPUTS
Default resolution is set to 12-bit relative humidity and 14-bit temperature readings. Measured data are
transferred in two byte packages, i.e. in frames of 8-bit length where the most significant bit (MSB) is transferred
first (left aligned). Each byte is followed by an acknowledge bit. The two status bits, the last bits of LSB, must be
set to ‘0’ before calculating physical values.
Thanks very much for any help.
I expect it child's play to you lads
All the best
Mark