| 数据搜索系统,热门电子元器件搜索 |
|
SGP41-D-R4 数据表(PDF) 13 Page - Sensirion AG Switzerland |
|
|
|||||||||||||||||||||||||||||
SGP41-D-R4 数据表(HTML) 13 Page - Sensirion AG Switzerland |
|
13 / 22 page ![]() www.sensirion.com version 1.0 – December 2021 13/22 structured in data words, where one word consists of two bytes of data (most significant bit first) followed by a one-byte CRC checksum. Each byte must be acknowledged by the master with an ACK condition for the sensor to continue sending data. If the sensor does not receive an ACK from the master after any byte of data, it will not continue sending data. After receiving the checksum for the last word of data, a NACK and STOP condition have to be sent (see Figure 15). The I2C master can abort the read transfer with a NACK followed by a STOP condition after any data byte if it is not interested in subsequent data, e.g., the CRC byte or following data bytes, in order to save time. Note that the data cannot be read more than once, and access to data beyond the specified amount will return a pattern of high bits. 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 0xEF) = 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 SGP41 are listed in Table 8. Command Command hex. code Parameter length including CRC [bytes] Response length including CRC [bytes] Measurement duration [ms] Typ. Max. sgp41_execute_conditioning 0x26 0x12 6 3 45 50 sgp41_measure_raw_signals 0x26 0x19 6 6 45 50 sgp41_execute_self_test 0x28 0x0E – 3 300 320 sgp4x_turn_heater_off 0x36 0x15 – – 0.1 1 sgp4x_get_serial_number 0x36 0x82 – 9 0.1 1 Table 8 I2C commands available for SGP41. |
|
|
链接网址 |
| ALLDATASHEET是否为您带来帮助? [ DONATE ] |
关于 Alldatasheet | 广告服务 | 联系我们 | 隐私政策 | 数据表链接 | 链接交换 | 制造商名单 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 |