Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

register settings for BMP280

Status
Not open for further replies.

abimann

Member level 4
Joined
Jun 21, 2016
Messages
77
Helped
0
Reputation
0
Reaction score
0
Trophy points
6
Activity points
673
Hello , cannot connect my FPGA to BMP280 ,, code has not problem can read some data from BMP but pressure doesnot change

HTML:
 write operation 
"1110110"&"0"&"11100000"&"10110110";--softreset _ B6
"1110110"&"0"&"11110100"&"10010011";--F4,Temp oversampling x8,Press osrsP oversampling x8, normal mode 
"1110110"&"0"&"11110101"&"01101100";--F5 125, filter 8  disable SPI
read operation:
        BME280_REGISTER_PRESSUREDATA       = 0xF7,
        BME280_REGISTER_TEMPDATA           = 0xFA,
        BME280_REGISTER_HUMIDDATA          = 0xFD

no data change from :

BME280_REGISTER_PRESSUREDATA = 0xF7,
BME280_REGISTER_TEMPDATA = 0xFA,
BME280_REGISTER_HUMIDDATA = 0xFD
Somebody can help me ?
 

Hello , cannot connect my FPGA to BMP280 ,, code has not problem can read some data from BMP but pressure doesnot change

HTML:
 write operation 
"1110110"&"0"&"11100000"&"10110110";--softreset _ B6
"1110110"&"0"&"11110100"&"10010011";--F4,Temp oversampling x8,Press osrsP oversampling x8, normal mode 
"1110110"&"0"&"11110101"&"01101100";--F5 125, filter 8  disable SPI
read operation:
        BME280_REGISTER_PRESSUREDATA       = 0xF7,
        BME280_REGISTER_TEMPDATA           = 0xFA,
        BME280_REGISTER_HUMIDDATA          = 0xFD

no data change from :

BME280_REGISTER_PRESSUREDATA = 0xF7,
BME280_REGISTER_TEMPDATA = 0xFA,
BME280_REGISTER_HUMIDDATA = 0xFD
Somebody can help me ?

Hello,

maybe it be helpful:

https://github.com/adafruit/Adafruit_BMP280_Library/blob/master/Adafruit_BMP280.cpp

At this link is Arduino library for that sensor, and here is a method which is reading pressure - it is quite complex:

Code:
float Adafruit_BMP280::readPressure(void) {
  int64_t var1, var2, p;

  // Must be done first to get the t_fine variable set up
  readTemperature();

  int32_t adc_P = read24(BMP280_REGISTER_PRESSUREDATA);
  adc_P >>= 4;

  var1 = ((int64_t)t_fine) - 128000;
  var2 = var1 * var1 * (int64_t)_bmp280_calib.dig_P6;
  var2 = var2 + ((var1*(int64_t)_bmp280_calib.dig_P5)<<17);
  var2 = var2 + (((int64_t)_bmp280_calib.dig_P4)<<35);
  var1 = ((var1 * var1 * (int64_t)_bmp280_calib.dig_P3)>>8) +
    ((var1 * (int64_t)_bmp280_calib.dig_P2)<<12);
  var1 = (((((int64_t)1)<<47)+var1))*((int64_t)_bmp280_calib.dig_P1)>>33;

  if (var1 == 0) {
    return 0;  // avoid exception caused by division by zero
  }
  p = 1048576 - adc_P;
  p = (((p<<31) - var2)*3125) / var1;
  var1 = (((int64_t)_bmp280_calib.dig_P9) * (p>>13) * (p>>13)) >> 25;
  var2 = (((int64_t)_bmp280_calib.dig_P8) * p) >> 19;

  p = ((p + var1 + var2) >> 8) + (((int64_t)_bmp280_calib.dig_P7)<<4);
  return (float)p/256;
}

The register address of BMP280_REGISTER_PRESSUREDATA is proper in your code. Maybe analysis of source code of this library can help you.

Regards
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top