User manual

AHHYTM_E2.2.1
13/23
Application Note
Humidity Module
HYT
I
2
C MR - Measurement Request: Slave starts a measurement cycle
S 6 5 4 3 2 1 0 W A S
Device Slave Address [6:0]
Wait for Slave ACK
S Start Condition S Stop Condition A Acknowledge
(ACK)
2 Slave Address Bit
(Example: Bit 2)
W Read/Write bit
(Example:Write = 0)
4.3 DF (Data Fetch)
The data fetch command serves to nish reading the output register. The DF command is sent by the master to
the humidity module (slave) and begins with the 7 Bit slave address. The 8th bit is 1 (= read). The humidity module
sends back an acknowledgement (ACK = 0) in case of correct addressing. The number of bits, that the humidity
module sends back, is completed when the master sends a NACK (ACK = 1) and launches stop condition. The rst
two bytes of measurement data contain the two status bits as MSB, followed by the humidity value with 14 bits.
The MR command consists of the address of the humidity module, with which the R/W bit is transferred as 0 (=
write). After the humidity module is answered with ACK (= measurement started), the master nalized the transfer
with NACK (ACK = 1) and launches stop condition. If temperature data is needed, these can be read after the
humidity value. The most signicant 8 bits of the temperature value will be transferred as third byte. Then the least
signicant 6 bits of the temperature value can be read as the fourth byte. The last two bits are not used and should
be masked away. The master has the possibility to terminate the reading after each read byte through a NACK.
Hence, it is possible to nish reading even after the rst byte and evaluate only the status/stale bit and the master
can terminate the transfer without completing the whole cycle. If only the upper 8 bits of the temperature value are
to be transferred (8 bit resolution), the transfer can be aborted after the third byte by a NACK.
PC DF - 2 Bytes: Slave returns only capacitnce data to the master in 2 bytes
S 6 5 4 3 2 1 0 R A 15 14 13 12 11 10 9 8 A 7 6 5 4 3 2 1 0 N S
Device Slave Address [6:0] Cap. Data [13:8] Cap. Data [7:0]
Wait for Slave ACK Master ACK Master ACK Master NACK
S 6 5 4 3 2 1 0 R A 15 14 13 12 11 10 9 8 A 7 6 5 4 3 2 1 0 A 7 6 5 4 3 2 1 0 N S
Device Slave Address [6:0] Cap. Data [13:8] Cap. Data [7:0] Temp. Data [15:8]
PC DF - 3 Bytes: Slave returns 2 capacitance data bytes & temperature high byte (T [15:8]) to master
S Start Condition S Stop Condtion (NACK) A Acknowledge (ACK) (Read = 1) N Not Acknowledge
R Read / Write 2 Slave Address Bit (Example: Bit 2) 2 Command or Data Bit (Example: Bit 2)
Status Bit