TucsonDon
Member
I am using a MikroElektronika Temp-Hum 3 click to measure temp & humidity, and having an issue with getting a consistent display.
I have the hdc2010 configured for:
Temp-14 bit
Hum-14 bit
auto sample 1 every minute w/ an IOC on RB1 for DRDY
temp is from -120° to 120° and humidity can display from 0 - 220% and changes with every display update
how can I display a more accurate and consistent reading[/code]
C:
void ReadOutsideTemp(void)
{
int Temp;
unsigned int Hum;
uint8_t RawTempHum[4];
i2c1_readDataBlock(TempHum, TempL, RawTempHum, 4); //read click board
Temp = RawTempHum[1] << 8 | RawTempHum[0];
Hum = RawTempHum[3] << 8 | RawTempHum[2];
Temp = (Temp / 2^16)*165 - 40;
Hum = (Hum / 2^16)*100;
if (SysConfigbits.TempFormat == ON) Temp = (Temp * 9 / 5) + 32; //change from °C to °F
SysTemp.Out = Temp; //for lcd display
SysTemp.RH = Hum; //for lcd display
TempDisplay(); //display on LCD
}
I have the hdc2010 configured for:
Temp-14 bit
Hum-14 bit
auto sample 1 every minute w/ an IOC on RB1 for DRDY
temp is from -120° to 120° and humidity can display from 0 - 220% and changes with every display update
how can I display a more accurate and consistent reading[/code]
Attachments
Last edited: