Abhilashhegde94
Member level 1

Hey guys ....
I am using 1 pic16f886 as a master and another pic16f886 as a slave communicating each other by means of an i2c bus..
The idea is to send a simple text from 1 master to many slaves but I have limited my code to test for just a single slave only.
The message is first recieved by a data reg through UART from the PC.From this data register the data is sent bit by bit via a i2c bus
The Problem i think is with the write function of i2c in my master code but I am not able to debug properly.
Also I am using UART along with i2c for message printing etc.
Pls check in my master and my slave code disregarding the functionality of UART since it works fine,but my i2c is a no-go.(also forget the switch case used to send to many slaves).
The 2 master and slave C files are attached .
View attachment project_code.zip
I am using 1 pic16f886 as a master and another pic16f886 as a slave communicating each other by means of an i2c bus..
The idea is to send a simple text from 1 master to many slaves but I have limited my code to test for just a single slave only.
The message is first recieved by a data reg through UART from the PC.From this data register the data is sent bit by bit via a i2c bus
The Problem i think is with the write function of i2c in my master code but I am not able to debug properly.
Also I am using UART along with i2c for message printing etc.
Pls check in my master and my slave code disregarding the functionality of UART since it works fine,but my i2c is a no-go.(also forget the switch case used to send to many slaves).
The 2 master and slave C files are attached .
View attachment project_code.zip