PicChristmas
New Member
I have the master setup to transmit data to the slave using the 18f2420. My question is what is the process to get the received data out of the SSPBUF in the slave unit? Do i have to test for more that the SPIF to know when the data has been recieved.
Code:
i2Write:
SSPCON2.0 =1 'initiate START condition
gosub i2Wait 'wait for current operation to finish
SSPBUF = i2cAddr 'send out slave address zero / all unit call
gosub i2Wait 'wait for current operation to finish
SSPBUF= rxChar 'write memory data
gosub i2Wait 'wait for current operation to finish
SSPCON2.2=1 'initiate STOP condition
gosub i2Wait 'wait for current operation to finish
return