Electronic Components Datasheet Search
  English  ▼

X  

ENS210 Datasheet(PDF) 19 Page - ams AG

Part # ENS210
Description  Relative Humidity and Temperature Sensor with I짼C Interface
PDF  43 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
Manufacturer  AMSCO [ams AG]
Direct Link  http://www.ams.com
Logo AMSCO - ams AG

ENS210 Datasheet(HTML) 19 Page - ams AG

Back Button ENS210 Datasheet HTML 15Page - ams AG ENS210 Datasheet HTML 16Page - ams AG ENS210 Datasheet HTML 17Page - ams AG ENS210 Datasheet HTML 18Page - ams AG ENS210 Datasheet HTML 19Page - ams AG ENS210 Datasheet HTML 20Page - ams AG ENS210 Datasheet HTML 21Page - ams AG ENS210 Datasheet HTML 22Page - ams AG ENS210 Datasheet HTML 23Page - ams AG Next Button
Zoom Inzoom in Zoom Outzoom out
 19 / 43 page
background image
ams Datasheet
Page 19
[v1-02] 2018-Feb-19
Document Feedback
ENS210 − Functional Description
Computing CRC-7
CRC algorithm uses a 7 bit polynomial (see lines 4, 5, and 6), and
a 17 bit payload. The crc7() function below uses the following
constants defining the CRC width, (the coefficients of the)
polynomial and the initial vector (start value of the CRC), and
some constants describing the payload data size.
//
7654
3210
// Polynomial
0b
1000
1001 ~ x^7+x^3+x^0
//
0x
8
9
#define CRC7WIDTH
7
// 7 bits CRC has polynomial of 7th order (has 8 terms)
#define CRC7POLY
0x89
// The 8 coefficients of the polynomial
#define CRC7IVEC
0x7F
// Initial vector has all 7 bits high
// Payload data
#define DATA7WIDTH 17
#define DATA7MASK
((1UL<<DATA7WIDTH)-1) // 0b 0 1111 1111 1111 1111
#define DATA7MSB
(1UL<<(DATA7WIDTH-1)) // 0b 1 0000 0000 0000 0000
The crc7(val) function returns the CRC-7 of a 17 bits value val.
// Compute the CRC-7 of 'val' (should only have 17 bits)
uint32_t crc7( uint32_t val ) {
// Setup polynomial
uint32_t pol= CRC7POLY;
// Align polynomial with data
pol = pol << (DATA7WIDTH-CRC7WIDTH-1);
// Loop variable (indicates which bit to test, start with highest)
uint32_t bit = DATA7MSB;
// Make room for CRC value
val = val << CRC7WIDTH;
bit = bit << CRC7WIDTH;
pol = pol << CRC7WIDTH;
// Insert initial vector
val |= CRC7IVEC;
// Apply division until all bits done
while( bit & (DATA7MASK<<CRC7WIDTH) ) {
if( bit & val ) val ^= pol;
bit >>= 1;
pol >>= 1;
}
return val;
}



Html Pages

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43


Datasheet Download

Go To PDF Page


Link URL



Does ALLDATASHEET help your business so far?  [ DONATE ] 

About Alldatasheet   |   Advertisement   |   Contact us   |   Privacy Policy   |   Link to Datasheet    |   Link Exchange   |   Manufacturer List
All Rights Reserved©Alldatasheet.com


Mirror Sites
English : Alldatasheet.com  |   English : Alldatasheet.net  |   Chinese : Alldatasheetcn.com  |   German : Alldatasheetde.com  |   Japanese : Alldatasheet.jp
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