数据搜索系统,热门电子元器件搜索
  Chinese  ▼
ALLDATASHEETCN.COM

X  

MS8607 数据表(PDF) 9 Page - Humirel

部件名 MS8607
功能描述  Digital Pressure and Humidity Sensor
PDF  4 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
制造商  HUMIREL [Humirel]
网页  http://www.humirel.com
标志 HUMIREL - Humirel

MS8607 数据表(HTML) 9 Page - Humirel

  MS8607 Datasheet HTML 1Page - Humirel MS8607 Datasheet HTML 2Page - Humirel MS8607 Datasheet HTML 3Page - Humirel MS8607 Datasheet HTML 4Page - Humirel  
Zoom Inzoom in Zoom Outzoom out
 9 / 4 page
background image
MEAS MS8607 DCS FOR ZedBoard
Digital Pressure and Humudity Sensor
SENSOR SOLUTIONS /// MEAS MS8607 DCS DEVELOPMENT KIT
07/2016
Page 9
printf("
(3)
- 1024\n");
printf("
(4)
- 2048\n");
printf("
(5)
- 4096\n");
printf("
(6)
- 8192\n");
// Get keyboard input ignoring keypresses that are not '1' or '2' or '3' or '4' or '5' or '6'
read(1, (char*)&key_input, 1);
while(key_input!='1' && key_input!='2' && key_input!='3' && key_input!='4' && key_input!='5' && key_input!='6'){
read(1, (char*)&key_input, 1);
}
if(key_input == '1'){
// If the '1' key is pressed
// Set OSR to 256
ms8607_pressure_res = ms8607_pressure_resolution_osr_256;
printf("\nSet MS8607 Over-Sampling Rate to 256\n");
}else if(key_input == '2'){
// If the '2' key is pressed
// Set OSR to 512
ms8607_pressure_res = ms8607_pressure_resolution_osr_512;
printf("\nSet MS8607 Over-Sampling Rate to 512\n");
}else if(key_input == '3'){
// If the '3' key is pressed
// Set OSR to 1024
ms8607_pressure_res = ms8607_pressure_resolution_osr_1024;
printf("\nSet MS8607 Over-Sampling Rate to 1024\n");
}else if(key_input == '4'){
// If the '4' key is pressed
// Set OSR to 2048
ms8607_pressure_res = ms8607_pressure_resolution_osr_2048;
printf("\nSet MS8607 Over-Sampling Rate to 2048\n");
}else if(key_input == '5'){
// If the '5' key is pressed
// Set OSR to 4096
ms8607_pressure_res = ms8607_pressure_resolution_osr_4096;
printf("\nSet MS8607 Over-Sampling Rate to 4096\n");
}else if(key_input == '6'){
// If the '6' key is pressed
// Set OSR to 8192
ms8607_pressure_res = ms8607_pressure_resolution_osr_8192;
printf("\nSet MS8607 Over-Sampling Rate to 8192\n");
}
// Wait for another key press and then display the main menu again
printf("\nPress any key to continue...\n");
read(1, (char*)&key_input, 1);
ms8607_main_menu();
}else if(key_input == '5'){
// If the '5' key is pressed
if(prom_read_flag==0){
// PROM was not yet read--cannot read temperature, pressure, and humidity yet
printf("PROM Coefficients have not yet been read. Cannot complete temperature/pressure read.\n");
}else{
// PROM has been read--continue on to read temperature, pressure, and humidity
// Read Temperature, Pressure, and Relative Humidity once
printf("\n");
printf("Reading Temperature, Pressure, and Relative Humidity...\n");
stat = ms8607_read_temperature_pressure_humidity(&temperature, &pressure, &relative_humidity);
// Display the status returned from the read_temperature_pressure_humidity
// operation and display the temperature, pressure, and humidity if successful
printf("Temperature, Pressure, and Relative Humidity Read Complete with status: ");
if(stat==ms8607_status_ok){
printf("Ok.\n");
printf("Temperature : %5.2f%cC, \tPressure : %5.1fhPa, \tRelative Humidity :
%4.1f%%",temperature,248,pressure,relative_humidity);
}else if(stat==ms8607_status_i2c_transfer_error){
printf("Transfer Error.");
}else if(stat==ms8607_status_crc_error){
printf("CRC Error.");
}
printf("\n");
}
// Wait for another key press and then display the main menu again
printf("\nPress any key to continue...\n");
read(1, (char*)&key_input, 1);
ms8607_main_menu();
}else if(key_input == '6'){
// If the '6' key is pressed
if(prom_read_flag==0){
// PROM was not yet read--cannot read temperature, pressure, and humidity
printf("PROM Coefficients have not yet been read. Cannot complete temperature/pressure/humidity read.\n");
}else{
// PROM has been read--continue on to read temperature, pressure, and humidity
// Read 20 temperature and relative humidity values at ~2 per second
printf("\n");
printf("Reading 20 Temperature and Relative Humidity Values...\n");
for(i=0;i<20;i++){
stat = ms8607_read_temperature_pressure_humidity(&temperature, &pressure, &relative_humidity);
printf("%2d: ",i+1);
if(stat==ms8607_status_ok){
printf("%5.2f%cC, \t%5.1fhPa, \t%4.1f%%",temperature,248,pressure,relative_humidity);
}else if(stat==ms8607_status_i2c_transfer_error){
printf("Transfer Error.");
}else if(stat==ms8607_status_crc_error){



Html Pages

1 2 3 4


数据表 下载

Go To PDF Page


链接网址



ALLDATASHEET是否为您带来帮助?  [ DONATE ] 

关于 Alldatasheet   |   广告服务   |   联系我们   |   隐私政策   |   数据表链接    |   链接交换   |   制造商名单
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