[PIC] I2C Master read problem

Status
Not open for further replies.

Karthi Keyan

Junior Member level 1
Joined
Aug 2, 2011
Messages
16
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
Bangalore
Activity points
1,385
Hi,
I am using Pic18f25k22. I am trying to read data from slave. Once the slave address is sent along with read bit, the receive the ack from slave both SDA and SCL goes to low. then master is not able to receive the data from slave. Here i attached both master and slave code. please check it.

Thanks,
Karthi.
View attachment Master_Read.txtView attachment Slave_write.txt
 

Hello,

have a look at the attached files. I hope this will help. Change the file extensions.

Enjoy!!!
 

Attachments

  • i2c.h.txt
    1.6 KB · Views: 56
  • i2c.c.txt
    1.2 KB · Views: 53
  • ds1307.h.txt
    529 bytes · Views: 60
  • ds1307.c.txt
    3.3 KB · Views: 67

Hello here is the code i wrote for master to salve communication.

Enjoy!!!
 

Attachments

  • I2C.rar
    196.1 KB · Views: 54

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…