Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

I2C between two PIC16F887

Status
Not open for further replies.

pasicr

Advanced Member level 1
Advanced Member level 1
Joined
Aug 13, 2005
Messages
440
Helped
39
Reputation
80
Reaction score
29
Trophy points
1,308
Location
Macedonia
Activity points
4,213
Hi for all,
can somebody share some working C code (mikroC or CCS C or any...) for I2C communication between one PIC16F887 like master PIC and one PIC16F887 like slave pic?
thanks in advance and
best regards
 

Despite at least that Master I2C APIs are avaliable at CCS compiler, I prefer to use some handshake driver wrote in C, due to allow further compatibility to other core platforms.

+++
 
  • Like
Reactions: pasicr

    pasicr

    Points: 2
    Helpful Answer Positive Rating
Thanks Andre,
but I must to find better solution,
best regards
 

I have written a CCS C I2C master slave code. It is working fine for one master and one slave, but if one master and more than one slave is used, it hangs. I will post the code soon.
 
  • Like
Reactions: pasicr

    pasicr

    Points: 2
    Helpful Answer Positive Rating
Thanks BigDog,
Jayanth, I wait your post,
best regards
 

Jayanth,
please dont forgot to attach your code for I2C between two PIC mcu,
regards
 

Collegues, maybe somebody need this,
I attach for you working I2C Master Slave code for PIC16F887 at 12MHz,
code is writen for mikroC Pro for Pic v4.6,
this example work on real hardware, not simulation,
best regards
 

Attachments

  • PIC16F887 master and slave I2C.rar
    44.6 KB · Views: 140

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top