English
Language : 

TH02 Datasheet, PDF (20/26 Pages) List of Unclassifed Manufacturers – D IGITAL I 2C H UMIDITY AND TEMPERATURE S ENSOR
TH02
3.2.2. I2C Read Operation
To read a register on the TH02, the master must first set the address pointer to indicate the register from which
the data is to be transferred. Therefore, the first communication with the TH02 is a write operation. 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 will issue 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 from which the data should be transferred. After
the TH02 acknowledges this byte, the master issues a repeated start command (Sr) indicating that a new transfer
is to take place. The TH02 is addressed once again with the R/W bit set to 1, indicating a read operation. The
TH02 will acknowledge its slave address and output data from the previously-selected register onto the data bus
under the control of the SCL signal, the master should not acknowledge (A) the data byte and issue a stop (P)
command (see Table 18). However, if a RH or Temperature conversion result (two bytes) is to be read, the master
should acknowledge (A) the first data byte and continue to activate the SCL signal. The TH02 will automatically
output the second data byte. Upon receiving the second byte, the master should issue a not Acknowledge (A)
followed by a stop command. (See Table 19).
Table 18. I2C Read Sequence for a Single Register
S Slave Address
WA
Sequence to Read from a Single Register
Address Pointer A Sr Slave Address R A
Register Data
AP
Sequence to Read Device ID
S
0x40
0A
0x11
A Sr
0x40
1A
ID
AP
S
0x40
0A
Sequence to Read RDY bit
0x00
A Sr
0x40
1 A — RDY A P
Table 19. I2C Read Sequence for RH or Temperature Conversion Result
Sequence to Read Conversion Result
S Slave W A Address A Sr Slave R A Register 1 A Register 2 A P
Address
Pointer
Address
Data
Data
S
0x40
0 A 0x01 A Sr 0x40 1 A Data H A Data L A P
Tel:+86-755-82973805 Fax: +86-755-82973550 Email:sales@hoperf.com http://www.hoperf.com
- 20 -