Hi everyone,
Once more I am struggling with I2C. I had two PIC16F877A communicating nicely. I built my code based on the example of master and slave from the website. But now, I have added more code to my slave code and that makes the writing command from master to slave fail. I have a time error on the master and the slave also does not receive the single byte I am trying to write to it.
Problem is that I need this piece of code in the slave.
I tried to add some test to make it loop only on the receive command until I2C has finished transmission but I could not make it work.
Is interrupt the way to go for that?
Any other idea or code example to avoid this type of issue?
Thanks for any help.
regards
Bookmarks