View previous topic :: View next topic |
Author |
Message |
jaka
Joined: 04 May 2014 Posts: 36 Location: Finland
|
|
Posted: Wed Nov 04, 2020 10:24 am |
|
|
I just tested to compile the bme280.c driver with 877a. You need to add #separate directives to either _bme280_compensate_P_int32() or _bme280_compensate_H_int32() functions, or both.
Like this:
Code: | #separate
static unsigned int32 _bme280_compensate_P_int32(signed int32 adc_P) |
It compiles without errors and consumes 48% of ROM on 877A. Tried with compiler 5.076. |
|
|
akay
Joined: 29 Sep 2020 Posts: 17
|
|
Posted: Wed Nov 04, 2020 12:53 pm |
|
|
Thank you for your valuable comments my friend. |
|
|
akay
Joined: 29 Sep 2020 Posts: 17
|
|
Posted: Wed Nov 04, 2020 1:02 pm |
|
|
jaka wrote: | I just tested to compile the bme280.c driver with 877a. You need to add #separate directives to either _bme280_compensate_P_int32() or _bme280_compensate_H_int32() functions, or both.
Like this:
Code: | #separate
static unsigned int32 _bme280_compensate_P_int32(signed int32 adc_P) |
It compiles without errors and consumes 48% of ROM on 877A. Tried with compiler 5.076. |
My friend first of all thank you.. Could you pls send me your compile code? |
|
|
akay
Joined: 29 Sep 2020 Posts: 17
|
|
Posted: Wed Nov 04, 2020 1:45 pm |
|
|
It's work but my sensor is ''gy-bme280-3.3''. i2c address 0x77 when connect the SDO to Vcc to select i2c 0x77. I changed to i2c address of driver but it not work. |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Wed Nov 04, 2020 6:29 pm |
|
|
Those are 7-bit i2c addresses. CCS uses 8-bit addresses.
Multiply them by 2 to convert them to 8-bit:
0x76 x 2 = 0xEC
0x77 x 2 = 0xEE |
|
|
akay
Joined: 29 Sep 2020 Posts: 17
|
|
Posted: Thu Nov 05, 2020 5:14 am |
|
|
PCM programmer wrote: | Those are 7-bit i2c addresses. CCS uses 8-bit addresses.
Multiply them by 2 to convert them to 8-bit:
0x76 x 2 = 0xEC
0x77 x 2 = 0xEE |
I don't understand. What can i do? Could you pls explain inside to program. |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19513
|
|
Posted: Thu Nov 05, 2020 5:19 am |
|
|
You said you had changed the BME280_I2C_ADDRESS. The point is this needs
to be 0xEC for a bme280 (7bit) address of 0x76, or 0xEE for a bme280
address of 77.
0x76 & 77, won't work. The address needs to be translated to 8bit format.
The 7bit address *2. |
|
|
akay
Joined: 29 Sep 2020 Posts: 17
|
|
Posted: Thu Nov 05, 2020 10:43 am |
|
|
Ttelmah wrote: | You said you had changed the BME280_I2C_ADDRESS. The point is this needs
to be 0xEC for a bme280 (7bit) address of 0x76, or 0xEE for a bme280
address of 77.
0x76 & 77, won't work. The address needs to be translated to 8bit format.
The 7bit address *2. |
so how can i translate to 8bit format.. i dont know how can i do? |
|
|
newguy
Joined: 24 Jun 2004 Posts: 1907
|
|
Posted: Thu Nov 05, 2020 10:48 am |
|
|
akay wrote: | Ttelmah wrote: | You said you had changed the BME280_I2C_ADDRESS. The point is this needs
to be 0xEC for a bme280 (7bit) address of 0x76, or 0xEE for a bme280
address of 77.
0x76 & 77, won't work. The address needs to be translated to 8bit format.
The 7bit address *2. |
so how can i translate to 8bit format.. i dont know how can i do? |
He told you how: multiply the 7 bit address by 2. |
|
|
|