Catalogue CRC Calculation Humidity Sensor
www.sensirion.com
print switch display
Page / 4
Sensirion -
/ 4
See other catalogues for Sensirion
Text version of the page
SENSIRION
the sensor company
SHTxx
Humidity & Temperature Sensmitter
Application Note CRC
1 Introduction
A CRC checksum is calculated over the whole transmission. If a CRC mismatch is detected, the SHTxx should be reset (command "00011110") and the measurement should be repeated.
2 Theory
CRC stands for Cyclic Redundancy Check. It is one of the most effective error detection schemes and requires a minimal amount of hardware.
For in-depth information on CRC we recommend the comprehensive: "A painless guide to CRC error detection algorithms" available at: http://www.repairfaq.org/filipg/LINK7F crc v3.html
The polynomial used in the SHTxx is: x8+ x5+ x4. The types of errors that are detectable with this polynomial are:
1. Any odd number of errors anywhere within the transmission.
2. All double-bit errors anywhere within the transmission.
3. Any cluster of errors that can be contained within an 8-bit "window" (1-8 bits incorrect).
4. Most larger clusters of errors.
The CRC register initializes with the value of the lower nibble of the status register ("0000's3s2s1so", default "00000000"). It covers the whole transmission (command and response bytes) without the acknowledge bits. See the datasheet SHT11 on page 4 for an example of CRC readout.
The receiver can perform the CRC calculation upon the first part of the original message and then compare the result with the received CRC- 8. If a CRC mismatch is detected, the SHTxx should be reset (command "00011110") and the measurement should be repeated.
This application note will cover two methods for checking the CRC. The first "Bitwise" is more suited for hardware or lowlevel implementation while the later "Bytewise" is the preferred method for more powerful microcontroller solutions.
1/4
Sensirion
www.sensirion.com
DirectIndustry's Virtual Technical Library: PDF Catalogue | Technical Documentation | Brochure | Manual | Industrial directory | Specifications | Characteristics
Search Go
page 1 p.1
page 2 p.2
page 3 p.3
page 4 p.4