Explain SPI Working Code, Two PIC Communication - MikroC

Status
Not open for further replies.

timcam

Newbie level 1
Joined
May 26, 2015
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
6
Reference Previous Thread: https://www.edaboard.com/threads/219637/

Hello RuH_iranga,

Thank you for posting this code. It is very helpful in understanding the PIC spi UART.

I am confused in how we can read more than one byte. Suppose we want to read 16 bits. The data sheet says the buffer holds 8 bits.

Code:
if(SSPSTAT.BF)
             {
                gdata=SSPBUF;
                SSPCON.SSPOV=0;
             }


Ho do we get the next byte?


Regards,

Tim








 
Last edited by a moderator:

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…