SBOA631 August 2025 HDC1010 , HDC1080 , HDC2010 , HDC2021 , HDC2022 , HDC2080 , HDC3020 , HDC3020-Q1 , HDC3021 , HDC3021-Q1 , HDC3022 , HDC3022-Q1 , HDC3120 , HDC3120-Q1
TI’s first-generation HDC1x devices all share the same register map (as illustrated in Table 2-1). Therefore, the following explanation applies across the HDC1x family.
| Pointer | Name | Reset value | Description |
|---|---|---|---|
| 0x00 | Temperature | 0x0000 | Temperature measurement output |
| 0x01 | Humidity | 0x0000 | Relative Humidity measurement output |
| 0x02 | Configuration | 0x1000 | HDC1080 configuration and status |
| 0xFB | Serial ID | device dependent | First 2 bytes of the serial ID of the part |
| 0xFC | Serial ID | device dependent | Mid 2 bytes of the serial ID of the part |
| 0xFD | Serial ID | device dependent | Last byte bit of the serial ID of the part |
| 0xFE | Manufacturer ID | 0x5449 | ID of Texas Instruments |
| 0xFF | Device ID | 0x1050 | ID of the device |
To begin, users must write a 16-bit value to the register in Table 2-2 (0x02) to define the measurement sequence – temperature, humidity or both sequentially.
| NAME | Bits | DESCRIPTION | ||
|---|---|---|---|---|
| RST | [15] | Software reset bit | 0 | Normal Operation, this bit self clears |
| 1 | Software Reset | |||
| Reserved | [14] | Reserved | 0 | Reserved, must be 0 |
| HEAT | [13] | Heater | 0 | Heater Disabled |
| 1 | Heater Enabled | |||
| MODE | [12] | Mode of acquisition | 0 | Temperature or Humidity is acquired. |
| 1 | Temperature and Humidity are acquired in sequence, Temperature first. | |||
| BTST | [11] | Battery Status | 0 | Battery voltage > 2.8V (read only) |
| 1 | Battery voltage < 2.8V (read only) | |||
| TRES | [10] | Temperature Measurement Resolution | 0 | 14 bit |
| 1 | 11 bit | |||
| HRES | [9:8] | Humidity Measurement Resolution | 00 | 14 bit |
| 01 | 11 bit | |||
| 10 | 8 bit | |||
| Reserved | [7:0] | Reserved | 0 | Reserved, must be 0 |
In the example below, the HDC1x is configured to measure both temperature and humidity in sequence by writing 0x10 (MSB) and 0x00 (LSB) to the register. Figure 2-2 illustrates the register bits that are set.
When the HDC1x is set to output temperature and humidity sequentially, users must initiate a 4-byte read from the Temperature Register (0x00).
The code for setting the configuration is as follows:
Wire.beginTransmission(0x40); // initiate communication with HDC1x
Wire.write(0x02); // point to configuration register
Wire.write(0x10); // write 8-bit configuration to config register (MSB)
Wire.write(0x00); // write 8 0s to Reserved bits (LSB)
Wire.endTransmission();Next, trigger the measurement process by writing to the device address (0x40).
Wire.beginTransmission(0x40); // initiate communication with HDC1x
Wire.write(0x00); // start measurements
Wire.endTransmission();
delay(20); // wait 20ms for conversion to complete.Since temperature and humidity are measured in sequence, a 4-byte read from register 0x00 is required. The first two bytes correspond to the temperature while the next two bytes correspond to humidity data.
Wire.requestFrom(0x40, 4); // requesting 4 bytes from device
// once 4 bytes are received, store this in appropriate variables
if (Wire.available() == 4) {
// stores raw temperature and humidity data
// reads/stores first byte (MSB), then reads/stores second byte
// combines each pair of bytes into a 16-bit integer
uint16_t tempBytes = (Wire.read() << 8) | Wire.read();
uint16_t humBytes = (Wire.read() << 8) | Wire.read();
}Finally, apply the standard conversion formulas from the HDC1x data sheet:
// equation for converting temperature output in Celsius
temp = (tempBytes / 65536.0) * 165.0 - 40.0;
// equation for converting humidity output
hum = (humBytes / 65536.0) * 100.0;This Arduino example demonstrates how to read and store temperature and humidity data from the HDC1x sensor when measurements are acquired sequentially. Once the raw data is stored, this can be converted to physical temperature and humidity values using the formulas provided in the HDC1x data sheet.
A complete working sample is available on the TI GitHub repository for environmental sensors here.