Electronic Components Datasheet Search
  English  ▼

X  

ENS210 Datasheet(PDF) 21 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) 21 Page - ams AG

Back Button 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 ENS210 Datasheet HTML 24Page - ams AG ENS210 Datasheet HTML 25Page - ams AG Next Button
Zoom Inzoom in Zoom Outzoom out
 21 / 43 page
background image
ams Datasheet
Page 21
[v1-02] 2018-Feb-19
Document Feedback
ENS210 − Functional Description
The following fragment processes the T measurement as
available in t_val. It relies on the crc7() function as shown
previously.
// Extract (and print) the fields
uint32_t t_data = (t_val>>0 ) & 0xffff;
uint32_t t_valid= (t_val>>16) & 0x1;
uint32_t t_crc = (t_val>>17) & 0x7f;
printf("ENS210: T: %06x %02x %01x %04x\n", t_val, t_crc, t_valid, t_data );
// Check the CRC
uint32_t t_payl = (t_val>>0 ) & 0x1ffff;
bool t_crc_ok= crc7(t_payl)==t_crc;
// Convert to float (and print)
float TinK = (float)t_data / 64; // Temperature in Kelvin
float TinC = TinK - 273.15;
// Temperature in Celsius
float TinF = TinC * 1.8 + 32.0; // Temperature in Fahrenheit
printf("ENS210: T: (i2c=%d crc=%d valid=%d) %5.1fK %4.1fC %4.1fF\n", i2c_ok, t_crc_ok, t_valid, TinK, TinC, TinF );
The following fragment processes the RH measurement as
available in h_val. It is similar to the t_val processing.
// Extract (and print) the fields
uint32_t h_data = (h_val>>0 ) & 0xffff;
uint32_t h_valid= (h_val>>16) & 0x1;
uint32_t h_crc = (h_val>>17) & 0x7f;
printf("ENS210: H: %06x %02x %01x %04x\n", h_val, h_crc, h_valid, h_data );
// Check the CRC
uint32_t h_payl = (h_val>>0 ) & 0x1ffff;
bool h_crc_ok= crc7(h_payl)==h_crc;
// Convert to float (and print)
float H = (float)h_data/512;
// relative humidity (in %)
printf("ENS210: H: (i2c=%d crc=%d valid=%d) %2.0f%%\n", i2c_ok, h_crc_ok, h_valid, H );
If registers 30 to 35 would contain fd 49 0b 6c 2e f5 (i.e. T_VAL
in blue and H_VAL in green) the code would print
ENS210: T: 0b49fd 05 1 49fd
ENS210: T: (i2c=1 crc=1 valid=1) 296.0K 22.8C 73.0F
ENS210: H: f52e6c 7a 1 2e6c
ENS210: H: (i2c=1 crc=1 valid=1) 23%



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