Hi, I have a strange problem with the i2c comunnication between a PIC18F452 and a PIC 16F877A. I'm using a ICD2 to debug the application so I have a certain control over then registers involved in the comunnication.
The probleme appears to be the BF bit of the SSPSTAT resgiter. It is not being set after the income of a new data.
I'm checking the SSPBUF for data income and it is arriving as is espected but the BF bit is not being set and my control algorithm is unable to perform any action because it uses that bit in a dependent fashion (check microchip's AN734).
I'm checking the BF bit before any SSPUBF reading!!!! that's the weird behaviour!!
Any comments or suggestions would be appreciated!!
Thank you all.
Added after 20 minutes:
Could be the ICD2 that is reading and clearing the MCU registers when I debug the application??
I have to discover what's going on before I get mad!!!
There is a problem with AN734 when using the PIC as a master ( i think thats what you are trying to do ). There is a web site that explaines this, but i dont have the link now with me ( its back in the office, sorry ). try to google it, if you cant find it, PM me and i will post it here.