View previous topic :: View next topic |
Author |
Message |
ajt
Joined: 07 Sep 2003 Posts: 110
|
|
Posted: Mon Sep 16, 2013 9:28 am |
|
|
waynewy wrote: | Just a quick question, where did you get the i2c library in order to use i2c_start(), i2c_write(), etc? |
They are all built-in CCS functions. _________________ Al Testani |
|
|
waynewy
Joined: 16 Sep 2013 Posts: 4 Location: United States
|
|
Posted: Mon Sep 16, 2013 9:44 am |
|
|
Forgive me that I am new to this forum. Where can I find those functions? I am actually trying to use PIC24E microcontrollers to interface with this sensor.
Thank you Al! |
|
|
ajt
Joined: 07 Sep 2003 Posts: 110
|
|
|
waynewy
Joined: 16 Sep 2013 Posts: 4 Location: United States
|
|
Posted: Mon Sep 16, 2013 9:58 am |
|
|
I am using MPLAB X with XC16 compiler.
I just downloaded MPLAB X plug-in. However, it seemed that I need more than that. |
|
|
ajt
Joined: 07 Sep 2003 Posts: 110
|
|
Posted: Mon Sep 16, 2013 10:01 am |
|
|
waynewy wrote: | I am using MPLAB X with XC16 compiler.
I just downloaded MPLAB X plug-in. However, it seemed that I need more than that. |
Yes, of course you do. You need the CCS compiler to use the built-in CCS functions! _________________ Al Testani |
|
|
waynewy
Joined: 16 Sep 2013 Posts: 4 Location: United States
|
|
Posted: Mon Sep 16, 2013 10:02 am |
|
|
Understood! Thank you so much for your instructions. I will figure it out hopefully. |
|
|
kaka khan
Joined: 28 Sep 2013 Posts: 2
|
|
Posted: Sat Sep 28, 2013 5:21 am |
|
|
can anyone help me to program bmp085 with pic16f877 |
|
|
Hexadec
Joined: 09 Jan 2013 Posts: 7
|
|
Posted: Tue Oct 15, 2013 1:29 pm |
|
|
Thanks for the code ajt, saved me a lot of time!
Working perfectly on 18F45K20 with LCD readout. |
|
|
pathmasugu
Joined: 21 Feb 2014 Posts: 25
|
|
Posted: Wed Mar 19, 2014 4:22 am |
|
|
This code works good ..........thank you ajt. _________________ ROCK RAJ |
|
|
monix7
Joined: 22 Aug 2015 Posts: 1
|
|
Posted: Sat Aug 22, 2015 5:25 am |
|
|
Dear friends,
I'm carrying out a project with a PIC18F2585 and various weather sensors, one of them the BMP180.
I copied the Testani's code, and the temperature reading seems to be OK, but it's strange the pressure reading, like -200 mBar, when it should be over +1000 mBar.
My home is few meters above sea level.
Should I change the : " #define P_CORRECTION 1.5 " or some of the calibration factors ??
I would be so grateful with any help. |
|
|
anhanh
Joined: 22 Sep 2015 Posts: 1
|
|
Posted: Tue Sep 22, 2015 9:39 pm |
|
|
please explain code for me // 160 * pow2(-15) * ac3; |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
|
inservi
Joined: 13 May 2007 Posts: 128
|
|
Posted: Mon Sep 26, 2016 8:20 am |
|
|
Hello,
Thank-you, your code work very well with a 16F1825 :-)
Here is the Altitude function i added from arduino library
Code: |
float BMP085pressureToAltitude(float seaLevel, float atmospheric) {
// Equation taken from BMP180 datasheet (page 16):
// http://www.adafruit.com/datasheets/BST-BMP180-DS000-09.pdf
// Note that using the equation from wikipedia can give bad results
// at high altitude. See this thread for more information:
// http://forums.adafruit.com/viewtopic.php?f=22&t=58064
return 44330.0 * (1.0 - pow(atmospheric / seaLevel, 0.1903));
}
|
_________________ in médio virtus |
|
|
|