Can someone help me with PIC16f877a to PIC16f877a i2c communication using hi-tech c compiler in MPLAB? The slave seems to give ACk when i2c debugger in in connection in proteues.
Hi,
Read about I2C communication from https://www.i2c-bus.org/slave/. After reading you will understand how to trasfer data from a slave device to master device.
The slave cannot start a message, it can only respond to a message initiated by a master. The master requests a response from a particular slave as defined by the device address byte in the I2C protocol. The slave module answer to the master at the appropriate times as defined by the protocol.
does anyone have hardware test videos or help for me for pic to pic connection using i2c. My code is well running in proteus but no expected response is there in real world
Have you pulled-up MCLR pins of Master and Slave? Have you pulled-up SCL and SDA lines high with 4.7K resistors? Post your latest working project files and Proteus file.
I did all that you have mentioned.ok this is my code for master to slave communication. i have simply sent a signal to slave and that signal is again tranferred back to the master. Master Pic is on the left.Please see the bug and help me set this up in real.