SHT1x / SHT7x Relative Humidity & Temperature Sensor System
www.sensirion.com v2.02 July 2004 3/9
2.2.3 Sending a command
To initiate a transmission, a “Transmission Start” sequence
has to be issued. It consists of a lowering of the DATA line
while SCK is high, followed by a low pulse on SCK and
raising DATA again while SCK is still high.
DATA
SCK
Figure 3 "Transmission Start" sequence
The subsequent command consists of three address bits
(only “000” is currently supported) and five command bits.
The SHTxx indicates the proper reception of a command by
pulling the DATA pin low (ACK bit) after the falling edge of
the 8th SCK clock. The DATA line is released (and goes
high) after the falling edge of the 9th SCK clock.
Table 2 SHTxx list of commands
2.2.4 Measurement sequence (RH and T)
After issuing a measurement command (‘00000101’ for RH,
‘00000011’ for Temperature) the controller has to wait for the
measurement to complete. This takes approximately
11/55/210 ms for a 8/12/14bit measurement. The exact time
varies by up to ±15% with the speed of the internal oscillator.
To signal the completion of a measurement, the SHTxx pulls
down the data line and enters idle mode. The controller must
wait for this “data ready” signal before restarting SCK to
readout the data. Measurement data is stored until readout,
therefore the controller can continue with other tasks and
readout as convenient.
Two bytes of measurement data and one byte of CRC
checksum will then be transmitted. The uC must
acknowledge each byte by pulling the DATA line low. All
values are MSB first, right justified. (e.g. the 5
th
SCK is MSB
for a 12bit value, for a 8bit result the first byte is not used).
Communication terminates after the acknowledge bit of the
CRC data. If CRC-8 checksum is not used the controller may
terminate the communication after the measurement data
LSB by keeping ack high.
The device automatically returns to sleep mode after the
measurement and communication have ended.
Warning: To keep self heating below 0.1 °C the SHTxx
should not be active for more than 10% of the time
(e.g. max. 2 measurements / second for 12bit accuracy).
2.2.5 Connection reset sequence
If communication with the device is lost the following signal
sequence will reset its serial interface:
While leaving DATA high, toggle SCK 9 or more times. This
must be followed by a “Transmission Start” sequence
preceding the next command. This sequence resets the
interface only. The status register preserves its content.
DATA
SCK
Transmission Start
123
4 -8
9
Figure 4 Connection reset sequence
2.2.6 CRC-8 Checksum calculation
The whole digital transmission is secured by a 8 bit
checksum. It ensures that any wrong data can be detected
and eliminated.
Please consult application note “CRC-8 Checksum
Calculation” for information on how to calculate the CRC.
DATA
SCK
a2
a1 C0
a0 C4 C3 C2 C1
ack
DATA
SCK
low
low 8
low low 11 10 9 ack
7
6 0
5 4 3 2 1 ack
MSB LSB
60
5 4 3 2 1 ack
LSB
DATA
SCK
7
MSB
Transmission Start Address=’000’ Command=’00101’
Measurement
~55ms for 12 bit
~11ms for 8 bit
Bold = SHT1xx controls DATA line
Plain = uC controls DATA line
Measurement is finished when the
SHTxx pulls down the DATA line
Skip acknowledge to end transmission
(if no CRC is used)
12 bit humidity data
CRC-8 Checksum
Skip acknowledge to
end transmission
wait for next measurement Transmission Start
Figure 5 Example RH measurement sequence for value “0000’1001 ’ 0011’0001”= 2353 = 75.79 %RH
(without temperature compensation)
Command Code
Reserved 0000x
Measure Temperature 00011
Measure Humidity 00101
Read Status Register 00111
Write Status Register 00110
Reserved 0101x-1110x
Soft reset, resets the interface, clears the
status register to default values
wait minimum 11 ms before next command
11110