28018 Parallax Inc, 28018 Datasheet - Page 7
![MODULE SENSOR TEMP+HUMIDITY](/photos/19/50/195082/mfg_28018_sml.jpg)
28018
Manufacturer Part Number
28018
Description
MODULE SENSOR TEMP+HUMIDITY
Manufacturer
Parallax Inc
Series
Sensirion SHT11r
Specifications of 28018
Output Type
Digital - 2-Wire
Sensor Type
Humidity and Temperature
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
Lead Free Status / RoHS Status
Lead free / RoHS Compliant, Lead free / RoHS Compliant
Available stocks
Company
Part Number
Manufacturer
Quantity
Price
Company:
Part Number:
28018879
Manufacturer:
st
Quantity:
8 111
Company:
Part Number:
28018883
Manufacturer:
st
Quantity:
3 791
Part Number:
28018883
Manufacturer:
ST
Quantity:
20 000
' returns "status"
'
SHT_Read_Status:
' sends "ioByte"
' returns "ackBit"
'
SHT_Write_Byte:
' returns "ioByte"
' sends "ackBit"
'
SHT_Read_Byte:
' wait for device to finish measurement (pulls data line low)
' -- timeout after ~1/4 second
'
SHT_Wait:
Parallax, Inc. • Sensirion SHT11 Sensor Module (#28018) • 07/2003
GOSUB SHT_Write_Byte
ioByte = status
GOSUB SHT_Write_Byte
RETURN
GOSUB SHT_Start
ioByte = ShtStatW
GOSUB SHT_Read_Byte
ackBit = NoAck
GOSUB SHT_Read_Byte
RETURN
SHIFTOUT ShtData, Clock, MSBFirst, [ioByte]
SHIFTIN
RETURN
SHIFTIN
SHIFTOUT ShtData, Clock, LSBFirst, [ackBit\1] ' send ack bit
INPUT ShtData
RETURN
INPUT ShtData
timeOut = No
FOR toDelay = 1 TO 250
NEXT
IF (toDelay = 250) THEN timeOut = Yes
RETURN
IF (ShtData = 0) THEN EXIT
PAUSE 1
ShtData, Clock, LSBPre, [ackBit\1]
ShtData, Clock, MSBPre, [ioByte]
' send command
' alert device
' write to status reg cmd
' send command
' only one byte to read
' send byte
' get ack bit
' get byte
' release data line
' data line is input
' assume no timeout
' wait ~1/4 second
' loop completed = timeout
7