OK, a new problem. I'm writing an I2C slave and have the following problem.
I have this bit of code,
I set a break point on the line SSP1BUF=temp;
The code stops, I single step it to copy temp into SSP1BUF and the two locations contain different values!!
The variable temp contains 'H', SSP1BUF contains,
7F???
And the thing is, I don't know IF it contains 0x7F or if MPLABX is lying to me??
I considered that another transfer was taking place and overwriting SSP1BUF so, I disconnected the other end before single stepping. Still the same.
I even put a test to see if SSP1BUF equaled temp and it didn't.
Note that the master can't start clocking out the value until the line SSP1CONbits.CKP=1 has been executed - the clock is being stretched.
Anyone got any suggestions at all?
Mike.