View previous topic :: View next topic |
Author |
Message |
sifirzero1
Joined: 14 Dec 2022 Posts: 43
|
Bmp180 |
Posted: Sun Oct 08, 2023 1:51 pm |
|
|
Hello friends, are there any working bmp180 codes made with pic16f88 or 16f877a? |
|
|
dyeatman
Joined: 06 Sep 2003 Posts: 1934 Location: Norman, OK
|
|
Posted: Sun Oct 08, 2023 2:28 pm |
|
|
This site will give you a start.
When you change the driver to BMP180 you may have to tweak it a bit but it
may work with no changes, I didn't look at it very closely.
NOTE: You WILL need a level shifter.
https://simple-circuit.com/pic16f877a-bmp280-sensor-ccs-c/ _________________ Google and Forum Search are some of your best tools!!!! |
|
|
sifirzero1
Joined: 14 Dec 2022 Posts: 43
|
|
Posted: Sun Oct 08, 2023 2:31 pm |
|
|
Bmp180 working circuit codes are required. Could you help. |
|
|
dyeatman
Joined: 06 Sep 2003 Posts: 1934 Location: Norman, OK
|
|
Posted: Sun Oct 08, 2023 2:34 pm |
|
|
We provide troubleshooting advice here, we don't write programs for folks.
You have been here a few times and should know that.
There may be someone out there somewhere that will do it for a small fee or
possibly for free but it's best that you don't ask here. _________________ Google and Forum Search are some of your best tools!!!! |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19539
|
|
Posted: Mon Oct 09, 2023 2:12 am |
|
|
As Mr Yeatman says, we are not a 'do it for you' forum.
First thing to realise, the wiring needed for the 280, and the 180 are the
same. The 280 is the later descendant of the 180, and comments applying
to one apply to the other.
So:
The BMP180 is obsolete. Honestly now use the 280.
Both are 3.3v chips. Your PIC's are both 5v. Now I2C 5v to 3.3v level
shifting is fairly easy. Look at:
AN97055 from Philips or a level shifter IC like the
PCA9517ADP or PCA9306D
There are also several little boards on the market offering this.
You need pull up resistors to 3.3v on the BMP side of this, and to 5v on
the PIC side of this. The BMP needs a 3.3v power supply while the PIC
needs a 5v supply.
Vdd & Vddio can both go to 3.3v
GND to 0v
SDA via the level translator to the PIC's SDA
SCL via another translator to the PIC's SCL.
CSB _must_ be left disconnected.
Four pull-ups two perhaps 2K each to 3.3v at the BMP, and two perhaps
4K7 each at the PIC.
Keep the bus reasonably short. This always applies with I2C, it is a
_local_ connection designed to talk to chips near to the processor, not
go long distances. The capacitance of the busses must be kept fairly
low.
There is complete driver code for this with the compiler. bmp180.c
This assumes the I2C is on pins B4 & B5 unless you tell it otherwise.
On the 877A, the I2C is on C3 & C4, while the F88 uses B1 & B4,
So you need to add defines setting these before you load this driver. |
|
|
|