English
Language : 

TH02 Datasheet, PDF (19/26 Pages) List of Unclassifed Manufacturers – D IGITAL I 2C H UMIDITY AND TEMPERATURE S ENSOR
TH02
3.2. I2C Operation
The TH02 uses a digital I2C interface. If the TH02 shares an I2C bus with other slave devices, it should be
powered down when the master controller is communicating with the other slave devices.
The format of the address byte is shown in Table 16.
Table 16. I2C Slave Address Byte
A6
A5
A4
A3
A2
A1
A0
R/W
1
0
0
0
0
0
0
1/0
3.2.1. I2C Write Operation
To write to a register on the TH02, the master should issue a start command (S) followed by the slave address,
0x40. The slave address is followed by a 0 to indicate that the operation is a write. Upon recognizing its slave
address, the TH02 issues an acknowledge (A) by pulling the SDA line low for the high duration of the ninth SCL
cycle. The next byte the master places on the bus is the register address pointer, selecting the register on the
TH02 to which the data should be transferred. After the TH02 acknowledges this byte, the master places a data
byte on the bus. This byte will be written to the register selected by the address pointer. The TH02 will
acknowledge the data byte, after which the master issues a Stop command (P). See Table 17.
Master Slave
Table 17. I2C Write Sequence
Sequence to Write to a Register
S Slave Address W A Address Pointer A Register Data A P
Sequence to Start a Relative Humidity Conversion
S
0x40
0A
0x03
A
0x01
AP
Sequence to Start a Temperature Conversion
S
0x40
0A
0x03
A
0x11
AP
Tel:+86-755-82973805 Fax: +86-755-82973550 Email:sales@hoperf.com http://www.hoperf.com
- 19 -