Component: SPI Slave (Comms: Interface)
Author | Matrix Ltd |
Version | 1.0 |
Category | Comms: Interface |
Contents
SPI Slave component
Low level routines for controlling or interacting with an SPI interface. SPI or Serial Peripheral Interface is a bus used for board level communications between devices. A target microcontroller will usually have at least one hardware SPI peripheral built in.
Component Source Code
Please click here to download the component source project: FC_Comp_Source_SPI_Slave.fcfx
Please click here to view the component source code (Beta): FC_Comp_Source_SPI_Slave.fcfx
Detailed description
No detailed description exists yet for this component
Examples
Simple Master program that sends an incrementing test value to the SPI bus as well as outputting the value onto LEDs.
Simple Slave program that collects the value sent by the master and outputs the value onto LEDs. Allows the master slave comms to be compared to check that everything is working correctly.
Another simple example to buffer incoming SPI bytes sent by the master and output these to the LCD.
Macro reference
![]() |
SendChar |
General purpose SPI send byte macro | |
![]() |
Char |
Data byte to send | |
![]() |
Return |
![]() |
GetChar |
General purpose SPI get byte macro | |
![]() |
Return |
![]() |
UnInitialise |
Deactivates the SPI peripheral leaving the I/O pins in a state where they can be used for general purpose I/O. | |
![]() |
Return |
![]() |
Initialise |
Activates the SPI peripheral and claims control over the I/O pins. | |
![]() |
Return |