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.

pic 16f877a i2c communication 1 master 3 slaves

Status
Not open for further replies.

Kwaku

Newbie
Joined
Jul 2, 2020
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
15
does anyone have a ccs c code on i2c communication between on master and 3 slaves
 

Hi,

All you need is
* "I2C slave" code for all the slaves (independent of count. They just need different address)
* "I2C master" code for the master

As long as the code keeps on I2C specifications
* you may use different codes on different slaves. (any code you find)
* master and slave code may come from different sources. (any code you find)

There is nothing special.

Klaus
 

    Kwaku

    Points: 2
    Helpful Answer Positive Rating
klauss do you have any sample code you can share
 

Are you asking about PIC software I2C slaves or hardware slaves? Did you already succeed in communicating with one slave?

Essentially communication with three slaves is just the same, using different slave addresses with first i2c_write( ) command. Did you notice the I2C examples in CCS forum code library?
 

Hi,
--- Updated ---

klauss do you have any sample code you can share
No. Because the manufacturer has, many compiler development tool providers have and many thousands in the internet.
Maybe even in this forum you may find more than 50 I2C codes for PIC.

Klaus
 
Last edited:

The OP is asking specifically for CCS C code. The tool has a library of built-in functions different e.g. from Mikro-C or Microchip XC8 compilers. You can of course write low level code in any compiler that accesses PIC special function registers directly, but I guess he doesn't want to.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top