LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

BME280 Barometric sensor & I2C problem with Write

Trying to obtain the temperature, pressure and humidity data from a BME280 sensor using I2C. From power up the sensor is in sleep mode and I can read the Config registers (0x88 to 0xA1), Chip ID (0xD0) and the temperature (0xF7 to 0x0xF9) as 80000, pressure (0xFA to 0xFC) as 80000 and Humidity (0xFD 0xFE) as 8000 which from data sheet confirms sleep mode.

 

Now sent Write command to set the config,measure and humidity registers so they come out of sleep mode but still get the 80000,80000 and 8000 data when being read.

 

So I am guessing that the Write command I am sending is not valid or recoginsed and wonder if there are specific vi's I should have used in Labview for I2C rather than the VISA ones as per Labview 2014 code attached.

Labview Version 8.5
Labview Version 8.6
Labview Version 2014
0 Kudos
Message 1 of 5
(2,935 Views)

The standard PC does not have hardware that natively supports the I2C protocol.  I recommend you search the Web for "LabVIEW I2C" to learn more.

 

Bob Schor

0 Kudos
Message 2 of 5
(2,909 Views)

Yes I know which is why I am using a USB to I2C FTDI adaptor and stated in posting as at address 0x55

Labview Version 8.5
Labview Version 8.6
Labview Version 2014
0 Kudos
Message 3 of 5
(2,905 Views)

Sorry, I responded based on your written post only.

 

I noticed (this time) your LabVIEW code seems to be communicating with the I2C chip at the default 9600 Baud transfer rate.  Why so (glacially) slow?  It should be capable of at least 115200.

 

Have you tried establishing communication through MAX?  You can configure the VISA Port, send a String, receive a string, see if it makes sense, and if not, "change something" (like Baud Rate, Parity, etc.).

 

Bob Schor

0 Kudos
Message 4 of 5
(2,893 Views)

That's ok, understand and will have a go through MAX but now think it might be between Labview and the installed software for FTDI module.

 

I have had a look at a few posts on the FTDI web site and a couple of people have written a set of dll's to interface and wonder if the driver I have installed is not sending the correct data to the Baro module?

 

From past experiance taking data from a device such as I2C bus, CAN etc is more tolerant from slave device than trying to write to it and load registers.

 

Guess I will keep plugging on and thanks for your help.

Labview Version 8.5
Labview Version 8.6
Labview Version 2014
0 Kudos
Message 5 of 5
(2,870 Views)