link to page 8 link to page 8 link to page 8 link to page 8 link to page 8 link to page 8 link to page 9 Datasheet SHT20 Command Comment Code header (1000’0001) as shown in Figure 16. If the internal Trigger T measurement hold master 1110’0011 processing is finished, the sensor acknowledges the poll of the MCU and data can be read by the MCU. If the Trigger RH measurement hold master 1110’0101 measurement processing is not finished the sensor Trigger T measurement no hold master 1111’0011 answers no ACK bit and the Start condition must be Trigger RH measurement no hold master 1111’0101 issued once more. Write user register 1110’0110 When using the no hold master mode, it is recommended Read user register 1110’0111 to include a wait period of 20 µs after the reception of the Soft reset 1111’1110 sensor’s ACK bit (bit 18 in Figure 16) and before the Stop Table 6 Basic command set, RH stands for relative humidity, condition. and T stands for temperature For both modes, since the maximum resolution of a Hold master or no hold master modes are explained in measurement is 14 bit, the two last least significant bits next Section. (LSBs, bits 43 and 44) are used for transmitting status information. Bit 1 of the two LSBs indicates the 5.4 Hold / No Hold Master Mode measurement type (‘0’: temperature, ‘1’ humidity). Bit 0 is There are two different operation modes to communicate currently not assigned. with the sensor: Hold Master mode or No Hold Master 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 mode. In the first case the SCL line is blocked (controlled by sensor) during measurement process while in the latter S 1 0 0 0 0 0 0 0 CKA 1 1 1 1 0 1 0 1 CKA wait P case the SCL line remains open for other communication I2C address + write Command (see Table 6) 18.5 µs while the sensor is processing the measurement. No hold master mode allows for processing other I2C 19 20 21 22 23 24 25 26 27 K communication tasks on a bus while the sensor is Measurement S 1 0 0 0 0 0 0 1 AC P N measuring. A communication sequence of the two modes measuring I2C address + read is displayed in Figure 15 and Figure 16, respectively. 19 20 21 22 23 24 25 26 27 In the hold master mode, the SHT2x pulls down the SCL line while measuring to force the master into a wait state. Measurement S 1 0 0 0 0 0 0 1 CKA By releasing the SCL line the sensor indicates that internal continue measuring I2C address + read processing is terminated, and that transmission may be 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 continued. 0 1 1 0 0 0 1 1 CK 0 1 0 1 0 0 1 0 CK 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 A A Data (MSB) Data (LSB) Stat. S 1 0 0 0 0 0 0 0 CKA 1 1 1 0 0 1 0 1 CKA 46 47 48 49 50 51 52 53 54 I2C address + write Command (see Table 6) K 0 1 1 0 0 1 0 0 CA P 19 20 21 22 23 24 25 26 27 N Checksum S 1 0 0 0 0 0 0 1 CKA Measurement I2C address + read Hold during measurement Figure 16 No Hold master communication sequence – grey blocks are controlled by SHT2x. If measurement is not 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 completed upon “read” command, sensor does not provide ACK 0 1 1 0 0 0 1 1 CKA 0 1 0 1 0 0 1 0 CKA on bit 27 (more of these iterations are possible). If bit 45 is changed to NACK followed by Stop condition (P) checksum Data (MSB) Data (LSB) Stat. transmission is omitted. 46 47 48 49 50 51 52 53 54 K 0 1 1 0 0 1 0 0 C In the examples given in Figure 15 and Figure 16 the A P N sensor output is SRH = ‘0110’0011’0101’0000’. For the Checksum calculation of physical values Status Bits must be set to ‘0’ Figure 15 Hold master communication sequence – grey blocks – see Chapter 6. are controlled by SHT2x. Bit 45 may be changed to NACK The maximum duration for measurements depends on the followed by Stop condition (P) to omit checksum transmission. type of measurement and resolution chosen – values are displayed in Table 7. Maximum values shall be chosen for In no hold master mode, the MCU has to poll for the the communication planning of the MCU. termination of the internal processing of the sensor. This is done by sending a Start condition followed by the I2C www.sensirion.com Version 5 – October 2022 8/14