SSPIF of i2c Slave becomes High before BF Sets

Status
Not open for further replies.

gopintj

Member level 4
Joined
Sep 1, 2010
Messages
77
Helped
4
Reputation
8
Reaction score
4
Trophy points
1,298
Location
Thirukalukalukundra, Kanchipuram, Tamilnadu, India
Activity points
1,953
Hi, After studying maximum PDFs i have come to know how I2C communication works. So i started writing a sample program for establishing a data communication link between Master and Slave. I, first initiated START condition. After polling WCOL, i transmitted the Address byte along with the WRITE bit.

In Slave, i initiated slave device along with START and STOP bit Interrupts. And wrote a program to poll SSPIF to occur. And here is the problem that makes me sad.

I had set 3 pins of PORTB of 16F877A for testing SSPIF, BF and SSPOV. When i start START condition, i can notice SSPIF becomes high. And, My Slave's SSPIF bit becomes high in the second clock pulse of Address Byte transmission. And, My SSPBUF is not getting filled.

Could anyone suggest me a solution to overcome this Error?



First and Second lines represent SCL and SDA. Third and Fourth lines represent SSPIF of Slave and Master.
 

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…