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.

BME280 sensor reading data

sairfan1

Full Member level 1
Joined
Jun 12, 2010
Messages
97
Helped
4
Reputation
8
Reaction score
7
Trophy points
1,288
Location
Regina, Canada
Activity points
2,371
I'm writing code for PIC mcu to read sonsor BME280 through SPI (for some reason I can't use I2C) I read the datasheet and here is what I understand to read sensor.

To start onversion through Forced mode I send 0x74 which is ctrl_meas register address I send values 0x25 that means x1 oversample for temp and x1 oversampling for pressure and bit [0] 1 to set force mode

Then I delay for 20ms to let conversion completed and data registers are loaded
I send 0xF7 to read first data register and keep reading until 0xFE
In response I alway get same the values for temp, hum, pres

I want to know am I doing right to initialize the sensor? I'm sorry I do not have code with me at this time I will post later,
 
Hi,

There may be wiring mistakes, timing mistakes (CS), there may be coding mistakes....


Textual description isn't clear.
Please:
* give a link to the datasheet (directly at the manufacturer site)
* show your schematic (hand drawn is O.K.)
* show your code
* tell us what you expect
* tell us what you get instead

Klaus
 
If you have an Arduino board laying around there are several projects
on web you could look at data traffic with it to confirm what interface
looks like.

Regards, Dana.
 
Thanks guys, I will put further information, by saying that I want to know if I'm sending correct commands to initialize the sensor I meant rest of things like communication, timing, code etc I have checked and they look good, but I understand still you can get some cllue there. I will attach the datasheet to the post.
--- Updated ---

BME280 datasheet attached.
 

Attachments

  • BME280-ds002.pdf
    1.4 MB · Views: 68

LaTeX Commands Quick-Menu:

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top