| Electronic Components Datasheet Search |
|
SGP40-D-R4 Datasheet(PDF) 12 Page - Sensirion AG Switzerland |
|
|
|||||||||||||||||||||||||||||
SGP40-D-R4 Datasheet(HTML) 12 Page - Sensirion AG Switzerland |
|
12 / 19 page ![]() www.sensirion.com Version 1.0 – July 2020 – D1 12/19 4.6 Checksum Calculation The 8-bit CRC checksum transmitted after each data word is generated by the CRC algorithm according to the properties as stated in Table 7. The CRC covers the contents of the two previously transmitted data bytes. Property Value Example code Name CRC-8 uint8_t CalcCrc(uint8_t data[2]) { uint8_t crc = 0xFF; for(int i = 0; i < 2; i++) { crc ^= data[i]; for(uint8_t bit = 8; bit > 0; --bit) { if(crc & 0x80) { crc = (crc << 1) ^ 0x31u; } else { crc = (crc << 1); } } } return crc; } Width 8 bit Protected Data read and/or write data Polynomial 0x31 (x8 + x5 + x4 + 1) Initialization 0xFF Reflect input False Reflect output False Final XOR 0x00 Examples CRC (0xBE EF) = 0x92 Table 7 Checksums are used for the 2-byte data packets only. The command codes themselves already contain a 3-bit CRC and therefore, a checksum must not be appended. 4.7 I2C Commands The available measurement commands of the SGP40 are listed in Table 8. Command Command hex. code Parameter length including CRC [bytes] Response length including CRC [bytes] Measurement duration [ms] Typ. Max. sgp40_measure_raw 0x26 0F 6 3 25 30 sgp40_measure_test 0x28 0E – 3 240 250 sgp40_heater_off 0x36 15 – – 0.1 1 Table 8 I2C commands available for SGP40. |
|
|
Link URL |
| Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Datasheet Upload | Contact us | Privacy Policy | Link to Datasheet | Link Exchange | Manufacturer List All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |