SMBus Test
The purpose of this program is to get humidity and air temperature from the Sensirion SHT21 chip. Once data is be sucked into the mbed, dewpoint calcluations will be done. Data will be displayed on the PC serial port.
- SHT21 address 0x40
- Trigger Temperature measurement - Hold Master 0xE3
- Trigger RH measurement - Hold Master 0xEA
- Trigger Temperature measurement - No Hold Master 0xF3
- Trigger RH measurement - NO Hold Master 0xFA
- Write User Register 0xE6
- Read User Register 0xE7
- Soft Reset 0xFe
A Hold Master is used when there is only one item on the I2C bus. The slave holds the SCL line while measurements being made by the SHT21. When the measurement is completed, the vaule will be read into the mbed.
A No Hold Master is used when there are multiple items on the I2C bus and it is desired to let other communications occur while measurements are being made by the SHT21. The mbed must poll the SHT21 to determine if the measurement is completed. The value can then be read into the mbed.
Measurment times range between 3 and 85 msec depending on the desire resolultion and measurement type. Refer to the SHT21 available from www.sensirion.com.
The first version of the code will use the Hold Master mode as it is simpler.
2 comments
You need to log in to post a comment
hi,
I am also working on SHT21 sensor with Mbed.
Can you please share your code ?.
Thank you,
Vatsal Shah