Catalogue CRC Calculation Humidity Sensor
www.sensirion.com
print switch display
Page / 4
Contact the
Manufacturer
Where to buy
this product ?
Request
a Quote
Sensirion -
/ 4
See other catalogues for Sensirion
Text version of the page
SHTxx Application Note CRC 2.2.2 Code example for lookup table The following procedure calculates the CRC-8. The result accumulates in the variable CRC.
VarCRC : Byte; Procedure calc_CRC(X: Byte); ConstCRC_Table : Array[0..255] of Byte = ( 0, 49, 98, 83, 196, 245, 166, 151, 185, 136, 219, 234, 125, 76, 31, 46, 67, 114, 33, 16, 135, 182, 229, 212, 250, 203, 152, 169, 62, 15, 92, 109, 134, 183, 228, 213, 66, 115, 32, 17, 63, 14, 93, 108, 251, 202, 153, 168, 197, 244, 167, 150, 1, 48, 99, 82, 124, 77, 30, 47, 184, 137, 218, 235, 61, 12, 95, 110, 249, 200, 155, 170, 132, 181, 230, 215, 64, 113, 34, 19, 126,79, 28, 45, 186, 139, 216, 233, 199, 246, 165, 148, 3, 50, 97, 80, 187, 138, 217, 232, 127,78, 29, 44, 2, 51, 96, 81, 198, 247, 164, 149, 248, 201, 154, 171, 60, 13, 94, 111, 65, 112, 35, 18, 133, 180, 231, 214, 122, 75, 24, 41, 190, 143, 220, 237, 195, 242, 161, 144, 7, 54, 101, 84, 57, 8, 91, 106, 253, 204, 159, 174, 128, 177, 226, 211,68, 117, 38, 23, 252, 205, 158, 175, 56, 9, 90, 107, 69, 116, 39, 22, 129, 176, 227, 210, 191, 142, 221, 236, 123,74, 25, 40, 6, 55, 100, 85, 194, 243, 160, 145, 71, 118, 37, 20, 131, 178, 225, 208, 254, 207, 156, 173, 58, 11, 88, 105, 4, 53, 102, 87, 192, 241, 162, 147, 189, 140, 223, 238, 121,72, 27, 42, 193, 240, 163, 146, 5, 52, 103, 86, 120, 73, 26, 43, 188, 141, 222, 239, 130, 179, 224, 209, 70, 119, 36, 21, 59, 10, 89, 104, 255, 206, 157, 172); BeginCRC := CRC_Table[X xor CRC]; End;

3 Revision history

Date Revision Changes December 30, 2001 0.9 (Preliminary) Initial revision February 18, 2001 1.01 February 27, 2001 1.02 corrected bug in CRC register init. (byte must be reversed) May 16, 2002 1.03emphasize that command to SHTxx is also in CRC Oct. 17, 2003 1.04 Changed download link December 16, 2003 1.05 Improved bitwise example table May 25, 2005 1.06 Changed company address Oct 3, 2006 1.07 Sensirion Inc. address added The latest version of this document and all application notes can be found at: www.sensirion.com/humidity

Headquarters and Sales Office

SENSIRION AG Phone: + 41 (0)44 306 40 00 Laubisrütistr. 50 Fax: + 41 (0)44 306 40 30 CH-8712 Stäfa ZH e-mail: info@sensirion.com Switzerland http://www.sensirion.com/ SENSIRION Inc Phone: 805-409 4900 Westlake Pl. Ctr. I, suite 240 Fax: 805-435 0467 2801 Townsgate Road e-mail: michael.karst@sensirion.com Westlake Village, CA 91361 http://www.sensirion.com/ USA
www.sensirion.comRev 1.07 4/4
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
pdf-page pdf di En 2008-12-49-05