We are using HDC1080 as a temperature sensor in our design.
We've recently sent the device to an external validation testing and the results showed error of 0.54C (at 25C).
This appears to contradict the accuracy ratings specified in the manual (typical +-0.2C, maximal +-0.4C).
My questions are as follows:
1. Are there any known issues with the accuracy of this temperature sensor?
2. Is each sensor factory calibrated or do we need to perform some calibration ourselves? If it's the latter, is there any standard way to do so?
3. The following is the conversion routine we use. Is it correct?
double ConvertHdcTemperatureToCelsius (_I_ char * raw_data)
{
short sVar ;
double dVar ;
//revert byte order, since HDC works in big endian.
*(((char *)&sVar) + 0) = raw_data[1] ;
*(((char *)&sVar) + 1) = raw_data[0] ;
dVar = (double)sVar ;
if (dVar < 0 )
{
dVar = (1 << 16) + dVar ;//register should be *positive* 16 bits number.
}
return ((dVar / (1 << 16)) * 165 - 40) ;
}