gopintj
Member level 4
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.
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.