Search found 190 matches
- Thu Dec 07, 2017 12:11 pm
- Forum: General Programming
- Topic: BME280 Pressure Sensor
- Replies: 45
- Views: 45666
Re: BME280 Pressure Sensor
Thank you for sharing the source code. I will try to work on it when I have time. 1st observation that came into my mind today: - For the Slave Address, instead of 0xEC and 0xEE, in order to show 0x76 and 0x77, I have used *2 and you have used <<1, which is the same, but shift left is faster and bet...
- Wed Dec 06, 2017 4:25 pm
- Forum: General Programming
- Topic: BME280 Pressure Sensor
- Replies: 45
- Views: 45666
Re: BME280 Pressure Sensor
I have added the oversampling, mode, standby time normal mode and filter parameters to the component settings and works fine. Then for Forced Mode I made a new Macro, but I am not sure if we have to add a small delay time instruction in that macro or not. I did not. The Reset Macro is corrected as w...
- Wed Dec 06, 2017 1:55 pm
- Forum: General Programming
- Topic: BME280 Pressure Sensor
- Replies: 45
- Views: 45666
Re: BME280 Pressure Sensor
In the Initialize Macro was done proper the Soft Reset from beginning.
- Wed Dec 06, 2017 11:50 am
- Forum: General Programming
- Topic: BME280 Pressure Sensor
- Replies: 45
- Views: 45666
Re: BME280 Pressure Sensor
If I have time I will do it, but I cannot promise as we have to move our office soon, so a lot of preparing beside the normal work. Here is one more thing related with Reset Macro. The initial code written by Ben is next: Initial code_Reset.jpg But the datasheet on page 25 says: Reset_Datasheet.jpg ...
- Wed Dec 06, 2017 11:09 am
- Forum: General Programming
- Topic: BME280 Pressure Sensor
- Replies: 45
- Views: 45666
Re: BME280 Pressure Sensor
OK, but I think it can be done also for temperature and humidity according with datasheet page 23, 49, 50.
- Wed Dec 06, 2017 10:56 am
- Forum: General Programming
- Topic: BME280 Pressure Sensor
- Replies: 45
- Views: 45666
Re: BME280 Pressure Sensor
@Leigh OK, the error was due to the same GUID for your component and my component. When you implemented the Compensation Integer and Float, did you do the Integer for Pressure, Humidity and Temperature as mentioned on datasheet page 23 and 50? Or was it implemented only for Pressure? I ask that beca...
- Tue Dec 05, 2017 4:13 pm
- Forum: General Programming
- Topic: BME280!
- Replies: 15
- Views: 12104
Re: BME280!
Hi Leigh, You are right, I realized that unique GUID later after I have done the tests below. The I2C address appeared now in the component that you provided and the compensation Integer and Float – I like that. Here are few more notes with test done in mean time, before I have read your reply. In t...
- Tue Dec 05, 2017 2:02 pm
- Forum: General Programming
- Topic: BME280!
- Replies: 15
- Views: 12104
Re: BME280!
I have tested this time the above code with the new packed component (that has resolution 0-5 for float) and in the same time the component BME280_2.fcpx" from here (https://www.matrixtsl.com/mmforums/viewtopic.php?f=7&t=19494#p84986 ). I have used dsPIC33FJ128GP802 with OLED 120x64 SH1106. My compo...
- Tue Dec 05, 2017 1:54 pm
- Forum: General Programming
- Topic: BME280 Pressure Sensor
- Replies: 45
- Views: 45666
Re: BME280 Pressure Sensor
For me, due to unknown reasons, the above component does not work.
- Tue Dec 05, 2017 10:57 am
- Forum: General Programming
- Topic: BME280!
- Replies: 15
- Views: 12104
Re: BME280!
Hi Jorgen,
Just by curiosity, did you try to test the " BME280_2.fcpx" component from here (you may rename it as you want)?
viewtopic.php?f=7&t=19494#p84986
Just by curiosity, did you try to test the " BME280_2.fcpx" component from here (you may rename it as you want)?
viewtopic.php?f=7&t=19494#p84986
- Tue Dec 05, 2017 10:54 am
- Forum: General Programming
- Topic: dsPIC33FJ128GP802 internal oscillator settings
- Replies: 3
- Views: 3056
Re: dsPIC33FJ128GP802 internal oscillator settings
Here is the C code with the settings that makes the dsPIC33FJ128GP802 run at (close to) 80MHz with internal oscillator: CLKDIVbits.PLLPRE=0; // PLLPRE (N2) 0=/2 PLLFBD=41; // pll multiplier (M) = +2 CLKDIVbits.PLLPOST=0; // PLLPOST (N1) 0=/2 //OSCCON=0x11A0; //OSCTUN = 0; while(!OSCCONbits.LOCK); //...
- Mon Dec 04, 2017 4:00 pm
- Forum: General Programming
- Topic: dsPIC33FJ128GP802 internal oscillator settings
- Replies: 3
- Views: 3056
Re: dsPIC33FJ128GP802 internal oscillator settings
dsPIC33FJ128GP802 Datasheet page 147 shows CLKDIV:
http://ww1.microchip.com/downloads/en/D ... 70292G.pdf
There is no PLLEN bit.
http://ww1.microchip.com/downloads/en/D ... 70292G.pdf
There is no PLLEN bit.
- Thu Nov 23, 2017 1:03 am
- Forum: General Programming
- Topic: BME280 Pressure Sensor
- Replies: 45
- Views: 45666
Re: BME280 Pressure Sensor
Try the code for the component BME280_2.fcfx
For me it worked with PIC16F1829, PIC18F4550 and with Arduino Uno R3.
For me it worked with PIC16F1829, PIC18F4550 and with Arduino Uno R3.
- Tue Nov 21, 2017 3:49 pm
- Forum: General Programming
- Topic: dsPIC33FJ128GP802 internal oscillator settings
- Replies: 3
- Views: 3056
dsPIC33FJ128GP802 internal oscillator settings
I have tried a simple LED blink 1s on and 1s off with the settings from page 25 of “DS70216C - Section 39. Oscillator for dsPIC33F/PIC24H”: http://ww1.microchip.com/downloads/en/DeviceDoc/70216C.pdf It does not work properly. It blinks too fast. That means improper settings for oscillator registers....
- Mon Nov 20, 2017 10:24 am
- Forum: General Programming
- Topic: BME280 Pressure Sensor
- Replies: 45
- Views: 45666
Re: BME280 Pressure Sensor
Because at the above problem no one here looked interested to double check it in order to confirm or refute my findings, I opened a discussion on Microchip forum: http://www.microchip.com/forums/m1025533.aspx Here is the conclusion: The XC8 version 1.41 with optimization level PRO has a bug when we ...
- Thu Nov 16, 2017 2:41 pm
- Forum: General Programming
- Topic: BME280 Pressure Sensor
- Replies: 45
- Views: 45666
Re: BME280 Pressure Sensor
What if the BME280 is SPI and not I2C?
Then I think we need a component BME280 also for SPI 3 or/and 4 wires.
Here is a XC8 example for PIC18F:
https://github.com/jrmcguire/BME280
Then I think we need a component BME280 also for SPI 3 or/and 4 wires.
Here is a XC8 example for PIC18F:
https://github.com/jrmcguire/BME280
- Thu Nov 16, 2017 1:53 pm
- Forum: General Programming
- Topic: BME280 Pressure Sensor
- Replies: 45
- Views: 45666
Re: BME280 Pressure Sensor
Here is final word about the above error. I have tried the evaluation of the expression with PIC18F4550 and works fine, no matter if it is a long expression or split in 2. No errors, not so ever, C code and normal calculation icon. It seems the problem was related only with PIC16F1829. As I mentione...
- Thu Nov 16, 2017 1:02 pm
- Forum: General Programming
- Topic: BME280 Pressure Sensor
- Replies: 45
- Views: 45666
Re: BME280 Pressure Sensor
If we come out of C and we implement the calculation with calculation icon in Fowcode then is funny: - with the real device PIC16F1829 I have the same bad result when the expression is kept long. - the simulator shows good result no matter if is long expression or split in 2. Could be then a limitat...
- Thu Nov 16, 2017 12:20 pm
- Forum: General Programming
- Topic: BME280 Pressure Sensor
- Replies: 45
- Views: 45666
Re: BME280 Pressure Sensor
To understand better what I am talking about, look at the next C code: signed long long int var1, temp1, temp2; FCL_TFINE=170000; FCL_P2=-10835; FCL_P3=3024; var1 = (((signed long long int)FCL_TFINE)>>1) - (signed long long int)64000; temp1 = (((signed long long int)FCL_P3 * (((var1>>2)*(var1>>2)) >...
- Thu Nov 16, 2017 11:23 am
- Forum: General Programming
- Topic: BME280 Pressure Sensor
- Replies: 45
- Views: 45666
Re: BME280 Pressure Sensor
These are the last tests and analysis that I have done regarding the pressure calculations. I have changed from signed long int to signed long long int. I have tried the calculatiosn with signed long long and is the same result. I have tested in 2 stages: one time free air settle time 5min and then ...
- Wed Nov 15, 2017 4:27 pm
- Forum: General Programming
- Topic: BME280 Pressure Sensor
- Replies: 45
- Views: 45666
Re: BME280 Pressure Sensor
Here is one more observation related with long int calculation of the pressure. The next line is not always proper evaluated: var1 = ((((signed long int)FCL_P3 * (((var1>>2)*(var1>>2)) >> 13)) >>3) + ((((signed long int)FCL_P2) * var1)>>1))>>18; When I say not always I mean that I put my finger on s...
- Tue Nov 14, 2017 3:20 pm
- Forum: General Programming
- Topic: BME280 Pressure Sensor
- Replies: 45
- Views: 45666
Re: BME280 Pressure Sensor
The datasheet page 49 shows the implementations with double precision floating point and „is only recommended for PC applications.“ The page 50 shows the “Pressure compensation in 32 bit fixed point”: https://ae-bst.resource.bosch.com/media/_tech/media/datasheets/BST-BME280_DS001-11.pdf In the “Read...
- Tue Nov 14, 2017 11:20 am
- Forum: Poll Discussion
- Topic: What improvements would you like to see?
- Replies: 16
- Views: 15763
Re: What improvements would you like to see?
Hi Steve,
I suck my words back! The scroll bar was covered by the 2D Dashboard panel and I worked on laptop without scroll wheel mouse.
But speaking about screenshots and FC7 interface, maybe you can help with the next one:
http://www.matrixtsl.com/mmforums/viewt ... 64&t=19501
I suck my words back! The scroll bar was covered by the 2D Dashboard panel and I worked on laptop without scroll wheel mouse.
But speaking about screenshots and FC7 interface, maybe you can help with the next one:
http://www.matrixtsl.com/mmforums/viewt ... 64&t=19501
- Tue Nov 14, 2017 11:11 am
- Forum: Flowcode V7
- Topic: Internal Real Time Clock RTCC PIC8 & PIC16
- Replies: 27
- Views: 17767
Re: Internal Real Time Clock RTCC PIC8 & PIC16
The Alarms would be useful. I intend to use DSPIC33FJ64GP802 or DSPIC33FJ128GP802. They have inside RTCC and Alarms. https://eu.mouser.com/search/ProductDetail.aspx?r=579-DSPIC364GP802ISP https://eu.mouser.com/search/ProductDetail.aspx?r=579-DSPIC128GP802ISP Microchip info about RTCC for dsPIC33F/PI...
- Mon Nov 13, 2017 4:21 pm
- Forum: General Programming
- Topic: BME280 Pressure Sensor
- Replies: 45
- Views: 45666
Re: BME280 Pressure Sensor
I do not know if I will have more time to stay on BME280 component code, but few things to consider if you plan to remake it by changing the code: - In the macro “ReadPressureFloat” I have used float instead of long long, to follow the CCS code, it works, but I do not like that too much. I would pre...