PIC 16F877A I2C micro c coding

Status
Not open for further replies.

ammmmu

New Member
Dear friends,
I need the program in micro c.The PIc 16F877A I2C please help me friends.....
 
Dear friends,
I need the program in micro c.The PIc 16F877A I2C please help me friends.....

mikroC comes with i2c examples.
What do you want to achieve, with what device you want to communicate using i2c, can you post your code here in order for us to try to help you?

here is the simple i2c code written in mikroC
Code:
void main(){
  Delay_ms(200); 
  I2C_Init(100000); //"fast" i2c initialisation

  I2C_Start(); 
  I2C_Wr(0xAA); //0xAA is the "write" address of the slave
  I2C_Wr(7); // send to address 7
  I2C_Wr(123); // send value 123
  I2C_Stop(); 
}

there is a sample i2c example here where mikroC is "master" and slave is written using picc
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…