I understand (from other sources) that SPI does simultaneously sends and receives a byte. Together with what I find in mE's help I can assume the following:
Lib help wrote:function Spi_Read(buffer : byte) : byte;
- Returns the received data.
- Provides clock by sending buffer and receives data at the end of period.
Code: Select all
take := Spi_Read(buffer);
Writes "buffer" to the SPI device and ignores data received.Lib help wrote:procedure Spi_Write(data : byte) : byte;
Returns Nothing.
Writes byte data to SSPBUF, and immediately starts the transmission.
My actual question is: are above assumptions about mE's SPI library correct?
I do ask this question because I am a complete novice regarding SPI usage, and I try to understand the usage of the library functions before attempting using them...