HTS221
Generated with MrT Device Utility
Bus: I2C
RegMap: Register Map
Datasheet: https://www.st.com/conte…
DigiKey: 497-15382-1-ND
I2C Address: 0xBE
Description
Humidity and Temperature Sensor
Register Map
Name |
Address |
Type |
Access |
Default |
Description |
---|---|---|---|---|---|
0x0F |
uint8 |
R |
0xBC |
Id Register |
|
0x10 |
uint8 |
RW |
0x1B |
Humidity and temperature resolution mode |
|
0x20 |
uint8 |
RW |
0x00 |
Control register 1 |
|
0x21 |
uint8 |
RW |
0x00 |
Control register 2 |
|
0x22 |
uint8 |
RW |
0x00 |
Control register 3 |
|
0x27 |
uint8 |
R |
0x00 |
Status register |
|
0x28 |
int16 |
R |
0x0000 |
Relative humidity data |
|
0x2A |
int16 |
R |
0x0000 |
Temperature data |
|
0x30 |
uint8 |
R |
0x00 |
Calibration data |
|
0x31 |
uint8 |
R |
0x00 |
Calibration data |
|
0x32 |
uint8 |
R |
0x00 |
Calibration data |
|
0x33 |
uint8 |
R |
0x00 |
Calibration data |
|
0x35 |
uint8 |
R |
0x00 |
Calibration data |
|
0x36 |
int16 |
R |
0x0000 |
Calibration data |
|
0x3A |
int16 |
R |
0x0000 |
Calibration data |
|
0x3C |
int16 |
R |
0x0000 |
Calibration data |
|
0x3E |
int16 |
R |
0x0000 |
Calibration data |
Registers
WHO_AM_I
- Address:
[0x0F]
- Default:
[0xBC]
Id Register
Bit |
7 |
6 |
5 |
4 |
3 |
2 |
1 |
0 |
---|---|---|---|---|---|---|---|---|
Field |
Fields
- WHO_AM_I:
Id Register
AV_CONF
- Address:
[0x10]
- Default:
[0x1B]
Humidity and temperature resolution mode
Bit |
7 |
6 |
5 |
4 |
3 |
2 |
1 |
0 |
---|---|---|---|---|---|---|---|---|
Field |
AVGT |
AVGH |
Fields
- AVGH:
Selects the number of Humidity samples to average for data output
Name |
Value |
Descriptions |
---|---|---|
4 |
b000 |
4 samples |
8 |
b001 |
8 samples |
16 |
b010 |
16 samples |
32 |
b011 |
32 samples |
64 |
b100 |
64 samples |
128 |
b101 |
128 samples |
256 |
b110 |
256 samples |
512 |
b111 |
512 samples |
- AVGT:
Selects the number of Temperature samples to average for data output
Name |
Value |
Descriptions |
---|---|---|
2 |
b000 |
2 samples |
4 |
b001 |
4 samples |
8 |
b010 |
8 samples |
16 |
b011 |
16 samples |
32 |
b100 |
32 samples |
64 |
b101 |
64 samples |
128 |
b110 |
128 samples |
256 |
b111 |
256 samples |
CTRL1
- Address:
[0x20]
- Default:
[0x00]
Control register 1
Bit |
7 |
6 |
5 |
4 |
3 |
2 |
1 |
0 |
---|---|---|---|---|---|---|---|---|
Field |
BDU |
ODR |
Flags
- PD:
power down mode
- BDU:
Block Data update. Prevents update until LSB of data is read
Fields
- ODR:
Selects the Output rate for the sensor data
Name |
Value |
Descriptions |
---|---|---|
ONESHOT |
b00 |
readings must be requested |
1HZ |
b01 |
1 hz sampling |
7HZ |
b10 |
7 hz sampling |
12_5HZ |
b11 |
12.5 hz sampling |
CTRL2
- Address:
[0x21]
- Default:
[0x00]
Control register 2
Bit |
7 |
6 |
5 |
4 |
3 |
2 |
1 |
0 |
---|---|---|---|---|---|---|---|---|
Field |
HEATER |
ONESHOT |
Flags
- BOOT:
Reboot memory content
- HEATER:
Enable intenal heating element
- ONESHOT:
Start conversion for new data
CTRL3
- Address:
[0x22]
- Default:
[0x00]
Control register 3
Bit |
7 |
6 |
5 |
4 |
3 |
2 |
1 |
0 |
---|---|---|---|---|---|---|---|---|
Field |
Fields
- CTRL3:
Control register 3
STATUS
- Address:
[0x27]
- Default:
[0x00]
Status register
Bit |
7 |
6 |
5 |
4 |
3 |
2 |
1 |
0 |
---|---|---|---|---|---|---|---|---|
Field |
HUM_READY |
TEMP_READY |
Flags
- TEMP_READY:
indicates that a temperature reading is ready
- HUM_READY:
indicates that a humidity reading is ready
HUMIDITY_OUT
- Address:
[0x28]
Relative humidity data
Bit |
15 |
14 |
13 |
12 |
11 |
10 |
9 |
8 |
7 |
6 |
5 |
4 |
3 |
2 |
1 |
0 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Field |
Fields
- HUM_OUT:
Current ADC reading for humidity sensor
TEMP_OUT
- Address:
[0x2A]
Temperature data
Bit |
15 |
14 |
13 |
12 |
11 |
10 |
9 |
8 |
7 |
6 |
5 |
4 |
3 |
2 |
1 |
0 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Field |
Fields
- TEMP_OUT:
Current ADC reading for temperature sensor
H0_rH_x2
- Address:
[0x30]
Calibration data
Bit |
7 |
6 |
5 |
4 |
3 |
2 |
1 |
0 |
---|---|---|---|---|---|---|---|---|
Field |
H0_rH_x2 |
H1_rH_x2
- Address:
[0x31]
Calibration data
Bit |
7 |
6 |
5 |
4 |
3 |
2 |
1 |
0 |
---|---|---|---|---|---|---|---|---|
Field |
H1_rH_x2 |
T0_DEGC_x8
- Address:
[0x32]
Calibration data
Bit |
7 |
6 |
5 |
4 |
3 |
2 |
1 |
0 |
---|---|---|---|---|---|---|---|---|
Field |
T0_DEGC_x8 |
T1_DEGC_x8
- Address:
[0x33]
Calibration data
Bit |
7 |
6 |
5 |
4 |
3 |
2 |
1 |
0 |
---|---|---|---|---|---|---|---|---|
Field |
T1_DEGC_x8 |
T1T0_MSB
- Address:
[0x35]
Calibration data
Bit |
7 |
6 |
5 |
4 |
3 |
2 |
1 |
0 |
---|---|---|---|---|---|---|---|---|
Field |
T1T0_MSB |
H0_T0_OUT
- Address:
[0x36]
Calibration data
Bit |
15 |
14 |
13 |
12 |
11 |
10 |
9 |
8 |
7 |
6 |
5 |
4 |
3 |
2 |
1 |
0 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Field |
H0_T0_OUT |
H1_T0_OUT
- Address:
[0x3A]
Calibration data
Bit |
15 |
14 |
13 |
12 |
11 |
10 |
9 |
8 |
7 |
6 |
5 |
4 |
3 |
2 |
1 |
0 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Field |
H1_T0_OUT |
T0_OUT
- Address:
[0x3C]
Calibration data
Bit |
15 |
14 |
13 |
12 |
11 |
10 |
9 |
8 |
7 |
6 |
5 |
4 |
3 |
2 |
1 |
0 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Field |
T0_OUT |
T1_OUT
- Address:
[0x3E]
Calibration data
Bit |
15 |
14 |
13 |
12 |
11 |
10 |
9 |
8 |
7 |
6 |
5 |
4 |
3 |
2 |
1 |
0 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Field |
T1_OUT |