CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

Bmp180

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
sifirzero1



Joined: 14 Dec 2022
Posts: 37

View user's profile Send private message

Bmp180
PostPosted: Sun Oct 08, 2023 1:51 pm     Reply with quote

Hello friends, are there any working bmp180 codes made with pic16f88 or 16f877a?
dyeatman



Joined: 06 Sep 2003
Posts: 1933
Location: Norman, OK

View user's profile Send private message

PostPosted: Sun Oct 08, 2023 2:28 pm     Reply with quote

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: 37

View user's profile Send private message

PostPosted: Sun Oct 08, 2023 2:31 pm     Reply with quote

Bmp180 working circuit codes are required. Could you help.
dyeatman



Joined: 06 Sep 2003
Posts: 1933
Location: Norman, OK

View user's profile Send private message

PostPosted: Sun Oct 08, 2023 2:34 pm     Reply with quote

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: 19463

View user's profile Send private message

PostPosted: Mon Oct 09, 2023 2:12 am     Reply with quote

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.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group