Another day has started. Just grabbed the datasheet and the IDE.
The device provided is a BME280 not a BMP280. How do I know this? I have created the start of a library and the ID register is returning 0x60. A BME280.
I have also been able to display the T and P registers, as follows:
I'm struggling with the BME280 SPI. Needless to say it works faultlessly on the Arduino!!!
I've tried all manner of permutations for SPI. I know it has clock leading edge descending and have set it accordingly. On the bright side I'm getting very good with GCB SPI :-)
I'm going to put the data analyser onto it tomorrow so I can see what's happening.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
My original post was really about converting arduino c code using float to GCB.
David seems to be doing that, ie converting arduino code and like me finding it not easy.
Not everyone can make sense of data sheets so get another hobby?
Instead of Anobium researching devices, how about someone doing a help on converting arduino c to GCB ? With GCB's increasing support for AVR it would be handy IMO.
No one thought my picaxe to gcb a good idea either :)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I soldered up a BMP280 several months ago, but when I looked through the datasheet I just gave up. The amount of calculation required to get a pressure reading is a problem (has anybody solved it?)
I've gone back to using LPS22 pressure sensors their drawback is that they are extremely difficult to hand solder (at least for me), but the pressure calculation is easy.
For humidity I have found the Si7006 works as good as any other and comes with a filter (it is very easy to contaminate the sensor).
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi David, I got arduino code for VL53L0X time of flight IR laser distance measure device.
I tried to convert it to GCB but gave up. Like a lot of interesting devices it's rocket science to set up :)
I'm still learning how to get most out of GCB and finding ideas tricky to implement and not knowing c wonder if things that I think hard to imlement in GCB might be a feature/function in c that's not possible in GCB but I'm not qualified to say yet.
Anyway..we confuse ourselves voluntarily.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I love my Logic Analyser :-) I've had it a while, nothing special a clone FX2 running Sigrok PulseView. I've not used it seriously until now so it's taken me a while to figure out what's happening. After many hours of fruitlessly searching code, I modified the Arduino Code so it just keeps repeating the request for an ID and initial configuration. Found it yahoo. The data is sent in 1 word blocks (16 bits) also Clk is normal. i.e. CPOL and CPHA both 0. Changing the clock modes doesn't seem to make any difference.
Tried it on the 16F887 with GCB, even bigger YAHOO, I'm getting the ID back!!!!!!
The structure of the data/conf in each word is (to me) a bit odd, to a seasoned programmer it may seem OK. Now I'm hopeful of getting somewhere now.
Just checked the 16f887/GCB output, it's in bytes, but the structure is the same.
i.e. 2 bytes joined are the same as 1 word
The calculations do look a bit grim David S and Stan but that's for later and is also where I chipped into this thread about Precision Floating Point.
Anobium reckons he can do that. "What! I never said that" lol. I'll have a go too when I get there.
I can do math, I'm just not very keen.
This chip is bugging me now so I'm determined to get it working. Like Anobium said somewhere, after trying to decipher Arduino code you sort of start to slowly learn C by beiing infused. I also have a compiler that supports SingleFP so if I can get that to work with the BME280 as well, I've got another experimentation tool.
If I succeed I will post the finished code, hope you're not to old by then ;-)
Last edit: David Thompson 2017-10-14
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anobium's optimistic opinion of users capabilities :)
I can get devices to work by copy/paste arduino code but I couldn't write that code myself..in any programming language. Even arduino users have problems with some devices it seems.
Floats are "easy to simulate,just scale everything up..and down" Yes, a doddle. Well...if you say so..not really.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Quite so Stan you just need to use the "right" numbers ;-) The left ones don't work, or is it the ones left.
That's where I am with Arduino, once you get past the "Do everything for you" code, it's a bit of a monster. I can almost understand some of it. but write a program? Hahaha
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Update. In one day I've gone from totally confused to fully enlightened.
I can now configure, read configuration and read Pressure, Temp and Humidity.
If I apply a little heat to the BME280, the Temp read out changes and the other two vary slightly.
So it looks like I can extract data, now down to the math :-(
Ah yes FYI the odd structure I mentioned above is simply the RX data being delayed by one byte.
So RegAdd into TX buffer & out, data from RegAdd into RX buffer, not sent until the next Tx "pushes" the RX out. Hope that makes sense.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
David,
I had some time yesterday and worked on your project. Made a proto board with a plugin socket , voltage reg for 3.3v and voltage translators for clk,data.
Had two BME280 s and they both got hot . Bad day in the Lab!
Had a BMP280 which worked. This program reads 6 consecutive registers starting with F7
The Atached program can be modified by adding two more registers and two more reads for the BME280. Only the last read should have the nack, which signals the end of the read.
Interesting.
The i2c BME I had died, so I switched to SPI. I've just got to about the same position as you.
I hadn't noticed that .xlsb was reading bits 4-7 as 0-3, will need adjustment unless "Filter" is turned off then .xlsb for Temp and Press = 0 i.e.16 bit resolution not 20. If needed, as you say shift right or divide by 16.
At the minute I have all data for temp, press and hum in 2 x Long (32 bit) and 1 x Word waiting for further processing.
I had a hot 3.3v regulator again, my fault, I'd crossed 5V and Gnd on the breadB while changing between Arduino and 16F887.
I've figured out what is mearnt by burst mode for SPI anyway, One SPI CS OFF followed by all the registers and variable names then one SPI CS ON. I'm using a Digital Analyser now so I can see what's happening, makes life much easier. This method doesn't work for the configuration.
I've been looking at the stored calibration data format. It's either signed or unsigned integers and there are 16 bit and 8 bit ones. They are stored in 2s compliment, so I need to dust off the "how to convert from 2s Comp into real numbers program", I've done it before, so at least it's not new ground.
What is your math like? If you want to make this a joint project, it might be an idea to split the calculations. I've been looking initially at Temp. I'm not overly bothered about Pressure so I would have done that last.
Like most Data Sheets the more i read them the more they make sense. By the time it's well dog eared enlightenment should be with me ;-)
Do you want to see my BME SPI code? It's on a different computer otherwise I'd just attach it now.
Last edit: David Thompson 2017-10-16
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
For two complement - look at the DS18B20 code. Shows you how to do this.
Attaching the library, see attached, I was developing with some example code show below - this exposes the following methods.. the rest is chip specific or serial setup.
Thanks Anobium, that's where I saw it before DS18B20.
Attached is my code to date if anyone wants to see how it's progressing.
I've tried to use the same variable names (or very similar) as in the DS, makes it easier to remember when scouring the DS for more info.
Just looked at BMP280.h, I'm assuming this is an "include" type of file. Looks good but a bit too clever for me :-) In other words I don't understand how it works.
I was looking at your code and your at about the same spot in developement just like you said.
I think that you have your byte order of the long wrong.
You have:
HWSPITransfer 0xf7, xx 'Start reading data send 0xf7 + No rx
HWSPITransfer 0xf8, press_H 'f8 out f7 in
HWSPITransfer 0xf9, press 'f9 out f8 in
HWSPITransfer 0xfa, press_U '0xfa out 0xf9 in xlsb = _U Note press_xlsb is bits 4 to 7
F7 -> Press_H
F8 -> Press
F9 -> Press_U
It should be:
' convert to one long from 3 bytes' this is how GCB defines a 32 bit long into bytes' lowb = workvariable' highb = workvariable_H'upperb = workvariable_U'lastb = workvariable_EPress=P_xlsbPress_H=P_lsbPress_U=P_msb
Arrgh the page has just crashed again for the 2nd time so here's the short version.
Are you sure Mike? I can't see how xlsb would be the 1st byte and lsb/msb the 2nd and 3rd.
Dim workvariable as word
workvariable = 21845
Dim lowb as byte
Dim highb as byte
Dim upperb as byte
Dim lastb as byte
Ididnotuseanintermediatevariablelowb=workvariable=Press1stbyte@F8wouldbePress_lsbhighb=workvariable_H=Press_H2ndbyte@F7wouldbePress_msbupperb=workvariable_U=Press_U3rdbyte@F9wouldbePress_xlsblastb=workvariable_E=Press_EbutnotusedwouldbePress_xmsbUpdate:I've now programmed collection all of the calibration data whichs seems to work fine.Sonowit's number crunching time.BeforeIstartIhaveaquestion.
The calibration data is in 2s compliment signed and unsigned mainly 12 bit Words. I assume the temp, pressure and humidiy is just binary. 16 and 20 bits
Is it better to convert 2s C into standard binary then do the calculations or convert the Temp,Pres,Hum data into 2s C and then do the calculation before converting the answer into decimal?
FYI
A few times I've had zero return from the BME, looks like some sort of loading issue on MISO.
If I disconnect MISO to the PIC, the digital analyser sees a MISO output. If I reconnect MISO to the PIC the analyser can still see the signal.
Last edit: David Thompson 2017-10-17
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
David,
I still think your F7,F8,F9 should be in that order in the "long" variable and then shifted right 4. Check out table 30 in section 5.4.8 and it describes the "xlsb" as bits 3:0.
I also succeeded in reading the calibration data.
Where in the .pdf does it say that the calibration data is in "2s compliment" ??. I haven't found it yet. I did see that the data is read as "little endian" with the lsb first and then the msb second.
Today is a busy day and I won't have time till late afternoon to look at it again.
GL
Mike
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I've managed to get a temperature reading out of a BMP280.
I made a few assumptions about the signs of the calibration values (as mine seem almost the same as those in the datasheet). The value is stored in the variable TEMP as temperature*100.
Hi
I'll respond to David S first. Thanks for your code, I've just had a lookl, why does everyone code differently to me? ;-) I can't understand how you read the Temperature data in Reg FA,FB,FC. Could you give me some pointers please? Which variables did you use for these? Also wrt Mike's comment above, how did you assign F7,F8 and F9? Or if you only did temperature 0xFA, 0xFB & 0xFC
F7 F8 F9
Mike, I haven't got a problem with being wrong on this, I just can't see your rational. If the Filter is set to OFF (16 bit) it loses 4 bits, if F9 was the lowest byte, the resolution range would only be
0x000FFFFF vs 0x00FFFFF0
If bits 7:4 were the start of the WORD i.e. to 3:0, there would be a gap in bits 7:4 so why show it as 3:0?
F9 at the top gives 20 bits as 0x000FFFFF and 16 bits as 0x0000FFFF difference 000F0000
F9 at the bottom 20 bits as 0x00FFFFF0 and 16 bits as 0x00FFFF00 difference 000000F0
When resolution is changed it's the hi bits that come off.
Table 29 & 30 states F9 & FC xlsb depend on resolution, not so the other 2
I agree that showing bits 3:0 being at location 7:4 is odd but ......
Did you notice that calib addr 0XE5 is split into 2? When I addressed it twice to retrieve data, I got 2 different values, so the BME handles it as 2 x 1 nibble addresses. Both are shown as being 3:0
2s Compliment
OK I'll swap 2s compliment for little endian :-) 2s compliment is mentioned in 4.2.2, 1st para, 3rd line.
Strewth, no wonder Bosch reccommend using their API, I can't see where I can fit one to a PIC/AVR though, but in fairness their intended market is Mobile Phones.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Stan, yes they can be very accurate. I believe for weather forcasts the relevant thing is the amount of change in the last 3 hours (falling slowly and all that stuff). As for altitude the accuracy is such that on a good day they can detect less than a metre change in height. I too got mine from RS, but loose (849-6187) the LPS22 is cheaper and easier to code (111-6455). I have attached a picture of it on my homemade board.
David T, I made a few compromises to cut down on the RAM. I only used 16-bits for the temperture (it is more than enough - ignore the xlsb and don't oversample the temperature). I am currently working on the pressure reading. There is some confusion in the datasheet - the pressure reading come out first. I also read the T calbration values to use in the equations 27075,26423,-1000.
My coding is a bit erratic I have been doing it for a long time I started out with Fortran (on punched cards)
Ping me on Google Chat. I have questions.... lots
Connected MCP2221 I2C/SMBus Terminal.
Ran the 'Start scan' with Xpress Board attached for address range 0xe0 to 0xff
Then, used to send write and read commands to device.
Looks like the device it is working.
Now, another day, over to Great Cow BASIC to initialise, read the temperature and the pressure.
Another day has started. Just grabbed the datasheet and the IDE.
The device provided is a BME280 not a BMP280. How do I know this? I have created the start of a library and the ID register is returning 0x60. A BME280.
I have also been able to display the T and P registers, as follows:
This is now just a slog to create a working library. This library needs to have methods according to the datasheet.
:-)
Last edit: Anobium 2017-10-04
I'm struggling with the BME280 SPI. Needless to say it works faultlessly on the Arduino!!!
I've tried all manner of permutations for SPI. I know it has clock leading edge descending and have set it accordingly. On the bright side I'm getting very good with GCB SPI :-)
I'm going to put the data analyser onto it tomorrow so I can see what's happening.
My original post was really about converting arduino c code using float to GCB.
David seems to be doing that, ie converting arduino code and like me finding it not easy.
Not everyone can make sense of data sheets so get another hobby?
Instead of Anobium researching devices, how about someone doing a help on converting arduino c to GCB ? With GCB's increasing support for AVR it would be handy IMO.
No one thought my picaxe to gcb a good idea either :)
I soldered up a BMP280 several months ago, but when I looked through the datasheet I just gave up. The amount of calculation required to get a pressure reading is a problem (has anybody solved it?)
I've gone back to using LPS22 pressure sensors their drawback is that they are extremely difficult to hand solder (at least for me), but the pressure calculation is easy.
For humidity I have found the Si7006 works as good as any other and comes with a filter (it is very easy to contaminate the sensor).
See https://sourceforge.net/p/gcbasic/discussion/579125/thread/df78cd39/#8b7d/d5a1/ceed
When I get time I will sort the library as shown in the post - the need for decimal is not a requirement as we can handle within the library.
Hi David, I got arduino code for VL53L0X time of flight IR laser distance measure device.
I tried to convert it to GCB but gave up. Like a lot of interesting devices it's rocket science to set up :)
I'm still learning how to get most out of GCB and finding ideas tricky to implement and not knowing c wonder if things that I think hard to imlement in GCB might be a feature/function in c that's not possible in GCB but I'm not qualified to say yet.
Anyway..we confuse ourselves voluntarily.
I love my Logic Analyser :-) I've had it a while, nothing special a clone FX2 running Sigrok PulseView. I've not used it seriously until now so it's taken me a while to figure out what's happening. After many hours of fruitlessly searching code, I modified the Arduino Code so it just keeps repeating the request for an ID and initial configuration. Found it yahoo. The data is sent in 1 word blocks (16 bits) also Clk is normal. i.e. CPOL and CPHA both 0. Changing the clock modes doesn't seem to make any difference.
Tried it on the 16F887 with GCB, even bigger YAHOO, I'm getting the ID back!!!!!!
The structure of the data/conf in each word is (to me) a bit odd, to a seasoned programmer it may seem OK. Now I'm hopeful of getting somewhere now.
Just checked the 16f887/GCB output, it's in bytes, but the structure is the same.
i.e. 2 bytes joined are the same as 1 word
The calculations do look a bit grim David S and Stan but that's for later and is also where I chipped into this thread about Precision Floating Point.
Anobium reckons he can do that. "What! I never said that" lol. I'll have a go too when I get there.
I can do math, I'm just not very keen.
This chip is bugging me now so I'm determined to get it working. Like Anobium said somewhere, after trying to decipher Arduino code you sort of start to slowly learn C by beiing infused. I also have a compiler that supports SingleFP so if I can get that to work with the BME280 as well, I've got another experimentation tool.
If I succeed I will post the finished code, hope you're not to old by then ;-)
Last edit: David Thompson 2017-10-14
Anobium's optimistic opinion of users capabilities :)
I can get devices to work by copy/paste arduino code but I couldn't write that code myself..in any programming language. Even arduino users have problems with some devices it seems.
Floats are "easy to simulate,just scale everything up..and down" Yes, a doddle. Well...if you say so..not really.
Quite so Stan you just need to use the "right" numbers ;-) The left ones don't work, or is it the ones left.
That's where I am with Arduino, once you get past the "Do everything for you" code, it's a bit of a monster. I can almost understand some of it. but write a program? Hahaha
Update. In one day I've gone from totally confused to fully enlightened.
I can now configure, read configuration and read Pressure, Temp and Humidity.
If I apply a little heat to the BME280, the Temp read out changes and the other two vary slightly.
So it looks like I can extract data, now down to the math :-(
Ah yes FYI the odd structure I mentioned above is simply the RX data being delayed by one byte.
So RegAdd into TX buffer & out, data from RegAdd into RX buffer, not sent until the next Tx "pushes" the RX out. Hope that makes sense.
David,
I had some time yesterday and worked on your project. Made a proto board with a plugin socket , voltage reg for 3.3v and voltage translators for clk,data.
Had two BME280 s and they both got hot . Bad day in the Lab!
Had a BMP280 which worked. This program reads 6 consecutive registers starting with F7
The Atached program can be modified by adding two more registers and two more reads for the BME280. Only the last read should have the nack, which signals the end of the read.
GL
Mike
David,
Here is how to convert the 3 bytes of Press and temperature to a long
EDIT'ed Actually this is wrong because xlsb is only 4 bits (7..4). This needs more work. Maybe shifted right 4?
Sorry
Mike
Last edit: mmotte 2017-10-16
Interesting.
The i2c BME I had died, so I switched to SPI. I've just got to about the same position as you.
I hadn't noticed that .xlsb was reading bits 4-7 as 0-3, will need adjustment unless "Filter" is turned off then .xlsb for Temp and Press = 0 i.e.16 bit resolution not 20. If needed, as you say shift right or divide by 16.
At the minute I have all data for temp, press and hum in 2 x Long (32 bit) and 1 x Word waiting for further processing.
I had a hot 3.3v regulator again, my fault, I'd crossed 5V and Gnd on the breadB while changing between Arduino and 16F887.
I've figured out what is mearnt by burst mode for SPI anyway, One SPI CS OFF followed by all the registers and variable names then one SPI CS ON. I'm using a Digital Analyser now so I can see what's happening, makes life much easier. This method doesn't work for the configuration.
I've been looking at the stored calibration data format. It's either signed or unsigned integers and there are 16 bit and 8 bit ones. They are stored in 2s compliment, so I need to dust off the "how to convert from 2s Comp into real numbers program", I've done it before, so at least it's not new ground.
What is your math like? If you want to make this a joint project, it might be an idea to split the calculations. I've been looking initially at Temp. I'm not overly bothered about Pressure so I would have done that last.
Like most Data Sheets the more i read them the more they make sense. By the time it's well dog eared enlightenment should be with me ;-)
Do you want to see my BME SPI code? It's on a different computer otherwise I'd just attach it now.
Last edit: David Thompson 2017-10-16
For two complement - look at the DS18B20 code. Shows you how to do this.
Attaching the library, see attached, I was developing with some example code show below - this exposes the following methods.. the rest is chip specific or serial setup.
BMP280_GetID
BMP280_GetStatus
BMP280_GetCtrlMeasurement
BMP280_GetCtrlHumidity
BMP280_GetConfig
Thanks Anobium, that's where I saw it before DS18B20.
Attached is my code to date if anyone wants to see how it's progressing.
I've tried to use the same variable names (or very similar) as in the DS, makes it easier to remember when scouring the DS for more info.
Just looked at BMP280.h, I'm assuming this is an "include" type of file. Looks good but a bit too clever for me :-) In other words I don't understand how it works.
Last edit: David Thompson 2017-10-16
David,
I was looking at your code and your at about the same spot in developement just like you said.
I think that you have your byte order of the long wrong.
You have:
F7 -> Press_H
F8 -> Press
F9 -> Press_U
It should be:
F7 -> Press_U .....msb
F8 -> Press_H .....lsb
F9 -> Press ....xlsb
BR
Mike
Arrgh the page has just crashed again for the 2nd time so here's the short version.
Are you sure Mike? I can't see how xlsb would be the 1st byte and lsb/msb the 2nd and 3rd.
Dim workvariable as word
workvariable = 21845
Dim lowb as byte
Dim highb as byte
Dim upperb as byte
Dim lastb as byte
The calibration data is in 2s compliment signed and unsigned mainly 12 bit Words. I assume the temp, pressure and humidiy is just binary. 16 and 20 bits
Is it better to convert 2s C into standard binary then do the calculations or convert the Temp,Pres,Hum data into 2s C and then do the calculation before converting the answer into decimal?
FYI
A few times I've had zero return from the BME, looks like some sort of loading issue on MISO.
If I disconnect MISO to the PIC, the digital analyser sees a MISO output. If I reconnect MISO to the PIC the analyser can still see the signal.
Last edit: David Thompson 2017-10-17
David,
I still think your F7,F8,F9 should be in that order in the "long" variable and then shifted right 4. Check out table 30 in section 5.4.8 and it describes the "xlsb" as bits 3:0.
I also succeeded in reading the calibration data.
Where in the .pdf does it say that the calibration data is in "2s compliment" ??. I haven't found it yet. I did see that the data is read as "little endian" with the lsb first and then the msb second.
Today is a busy day and I won't have time till late afternoon to look at it again.
GL
Mike
I've managed to get a temperature reading out of a BMP280.
I made a few assumptions about the signs of the calibration values (as mine seem almost the same as those in the datasheet). The value is stored in the variable TEMP as temperature*100.
Is it warm?
Is an expensive one easier to use? http://uk.rs-online.com/web/p/products/8486231/?grossPrice=Y&cm_mmc=UK-PLA-DS3A--google--PLA_UK_EN_Semiconductors--Semiconductor_Development_Kits--PRODUCT+GROUP&matchtype=&gclid=Cj0KCQjw1JbPBRCrARIsAOKj2PmyKE18TbPyj_8jn9K-F8Skk15IG-VZCLHtb27jELKcRzoqV7yT3woaAli0EALw_wcB&gclsrc=aw.ds
Could it forcast the weather from pressure change or is it for altitude or checking tyre pressure?
Hi
I'll respond to David S first. Thanks for your code, I've just had a lookl, why does everyone code differently to me? ;-) I can't understand how you read the Temperature data in Reg FA,FB,FC. Could you give me some pointers please? Which variables did you use for these? Also wrt Mike's comment above, how did you assign F7,F8 and F9? Or if you only did temperature 0xFA, 0xFB & 0xFC
F7 F8 F9
Mike, I haven't got a problem with being wrong on this, I just can't see your rational. If the Filter is set to OFF (16 bit) it loses 4 bits, if F9 was the lowest byte, the resolution range would only be
0x000FFFFF vs 0x00FFFFF0
If bits 7:4 were the start of the WORD i.e. to 3:0, there would be a gap in bits 7:4 so why show it as 3:0?
F9 at the top gives 20 bits as 0x000FFFFF and 16 bits as 0x0000FFFF difference 000F0000
F9 at the bottom 20 bits as 0x00FFFFF0 and 16 bits as 0x00FFFF00 difference 000000F0
When resolution is changed it's the hi bits that come off.
Table 29 & 30 states F9 & FC xlsb depend on resolution, not so the other 2
I agree that showing bits 3:0 being at location 7:4 is odd but ......
Did you notice that calib addr 0XE5 is split into 2? When I addressed it twice to retrieve data, I got 2 different values, so the BME handles it as 2 x 1 nibble addresses. Both are shown as being 3:0
2s Compliment
OK I'll swap 2s compliment for little endian :-) 2s compliment is mentioned in 4.2.2, 1st para, 3rd line.
Strewth, no wonder Bosch reccommend using their API, I can't see where I can fit one to a PIC/AVR though, but in fairness their intended market is Mobile Phones.
Stan, yes they can be very accurate. I believe for weather forcasts the relevant thing is the amount of change in the last 3 hours (falling slowly and all that stuff). As for altitude the accuracy is such that on a good day they can detect less than a metre change in height. I too got mine from RS, but loose (849-6187) the LPS22 is cheaper and easier to code (111-6455). I have attached a picture of it on my homemade board.
David T, I made a few compromises to cut down on the RAM. I only used 16-bits for the temperture (it is more than enough - ignore the xlsb and don't oversample the temperature). I am currently working on the pressure reading. There is some confusion in the datasheet - the pressure reading come out first. I also read the T calbration values to use in the equations 27075,26423,-1000.
My coding is a bit erratic I have been doing it for a long time I started out with Fortran (on punched cards)
on a good day they can detect less than a metre change in height.