communication between two PIC 16 F877A by using I2C

Status
Not open for further replies.

cheehow

Newbie level 3
Joined
Aug 4, 2010
Messages
3
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,330
hi, everyone... my project is doing the communication between 2 MCU with I2C connection. furthermore, in order to test the communcation between this two MCU, i using the LED and push button to test it. while i push the push button, the other MCU will be lite up the LED.
i m using CCS C compiler to write the code. so, first all of i initialize the I2c as following:

void int_i2c();
{
TRISC3=1;
TRISC4=1;
SSPCON=0X28;
SSPADD=(FOSC/(4*BUAD))-1;
SSPSTAT=80;
}
and i have initialized the port that i used as push button and LED...
so, my problem is how to start writing the code for my project ?

Please Help me ... urgent !!!
do any one know how to write the code ?? or have any sample for me to refer ?
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…