Jump to content

Component: SPI Master (EB013) (E-blocks 1): Difference between revisions

From Flowcode Help
m Text replacement - "width="10%" align="center" style="background-color:#D8C9D8;"" to "width="10%" align="center" class="mtx-class-macrohead""
m Text replacement - "width="90%" style="background-color:#D8C9D8; color:#4B008D;"" to "width="90%" class="mtx-class-macrohead""
Line 67: Line 67:
|-
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''DACSendChar'''
| width="90%" class="mtx-class-macrohead" | '''DACSendChar'''
|-
|-
| colspan="2" | Send a byte to the digital to analogue converter (DAC) on the EB013 SPI E-block. 
| colspan="2" | Send a byte to the digital to analogue converter (DAC) on the EB013 SPI E-block. 
Line 86: Line 86:
|-
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''DisableFram'''
| width="90%" class="mtx-class-macrohead" | '''DisableFram'''
|-
|-
| colspan="2" | Disable the SPI RAM chip on the EB013 SPI E-block. 
| colspan="2" | Disable the SPI RAM chip on the EB013 SPI E-block. 
Line 100: Line 100:
|-
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''EnableFram'''
| width="90%" class="mtx-class-macrohead" | '''EnableFram'''
|-
|-
| colspan="2" | Enable the SPI RAM chip on the EB013 SPI E-block. 
| colspan="2" | Enable the SPI RAM chip on the EB013 SPI E-block. 
Line 114: Line 114:
|-
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''FramOutput'''
| width="90%" class="mtx-class-macrohead" | '''FramOutput'''
|-
|-
| colspan="2" | Send a value to the RAM on the EB013 SPI E-block. 
| colspan="2" | Send a value to the RAM on the EB013 SPI E-block. 
Line 133: Line 133:
|-
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetChar'''
| width="90%" class="mtx-class-macrohead" | '''GetChar'''
|-
|-
| colspan="2" | General purpose SPI get byte macro 
| colspan="2" | General purpose SPI get byte macro 
Line 147: Line 147:
|-
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetString'''
| width="90%" class="mtx-class-macrohead" | '''GetString'''
|-
|-
| colspan="2" | Attempts to read a string of bytes from the SPI bus. 
| colspan="2" | Attempts to read a string of bytes from the SPI bus. 
Line 171: Line 171:
|-
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Initialise'''
| width="90%" class="mtx-class-macrohead" | '''Initialise'''
|-
|-
| colspan="2" | Activates the SPI peripheral and claims control over the I/O pins. 
| colspan="2" | Activates the SPI peripheral and claims control over the I/O pins. 
Line 185: Line 185:
|-
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''NVMGetChar'''
| width="90%" class="mtx-class-macrohead" | '''NVMGetChar'''
|-
|-
| colspan="2" | Reads a byte from the non-volatile memory device on the EB013 SPI E-block. 
| colspan="2" | Reads a byte from the non-volatile memory device on the EB013 SPI E-block. 
Line 204: Line 204:
|-
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''NVMSendChar'''
| width="90%" class="mtx-class-macrohead" | '''NVMSendChar'''
|-
|-
| colspan="2" | Send a byte to the non-volatile memory device on the EB013 SPI E-block. 
| colspan="2" | Send a byte to the non-volatile memory device on the EB013 SPI E-block. 
Line 228: Line 228:
|-
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SendChar'''
| width="90%" class="mtx-class-macrohead" | '''SendChar'''
|-
|-
| colspan="2" | General purpose SPI send byte macro 
| colspan="2" | General purpose SPI send byte macro 
Line 247: Line 247:
|-
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SendString'''
| width="90%" class="mtx-class-macrohead" | '''SendString'''
|-
|-
| colspan="2" | Sends a string of bytes to the SPI bus 
| colspan="2" | Sends a string of bytes to the SPI bus 
Line 266: Line 266:
|-
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''UnInitialise'''
| width="90%" class="mtx-class-macrohead" | '''UnInitialise'''
|-
|-
| colspan="2" | Deactivates the SPI peripheral leaving the I/O pins in a state where they can be used for general purpose I/O. 
| colspan="2" | Deactivates the SPI peripheral leaving the I/O pins in a state where they can be used for general purpose I/O. 
Line 281: Line 281:
|-
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-prop-icon.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-prop-icon.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties'''  
| width="90%" class="mtx-class-macrohead" | '''Properties'''  
|-
|-
|-
|-

Revision as of 14:23, 13 July 2026

Author Matrix TSL
Version 2.0
Category E-blocks 1


SPI Master 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. If the hardware SPI pins are in use or more SPI channels are required then there is also a software mode available. Has additional functions to work with the E-blocks EB013 SPI hardware.

Component Source Code

Please click here to download the component source project: FC_Comp_Source_SPI_Legacy.fcfx

Please click here to view the component source code (Beta): FC_Comp_Source_SPI_Legacy.fcfx

Detailed description

No detailed description exists yet for this component

Examples

No additional examples







Macro reference

DACSendChar

DACSendChar
Send a byte to the digital to analogue converter (DAC) on the EB013 SPI E-block. 
- BYTE Data
Data byte to output using the DAC 
- VOID Return


DisableFram

DisableFram
Disable the SPI RAM chip on the EB013 SPI E-block. 
- VOID Return


EnableFram

EnableFram
Enable the SPI RAM chip on the EB013 SPI E-block. 
- VOID Return


FramOutput

FramOutput
Send a value to the RAM on the EB013 SPI E-block. 
- BYTE Char
 
- BYTE Return


GetChar

GetChar
General purpose SPI get byte macro 
- BYTE Return


GetString

GetString
Attempts to read a string of bytes from the SPI bus. 
- BYTE NumBytes
 
- BYTE Ch
 
- STRING Return


Initialise

Initialise
Activates the SPI peripheral and claims control over the I/O pins. 
- VOID Return


NVMGetChar

NVMGetChar
Reads a byte from the non-volatile memory device on the EB013 SPI E-block. 
- ULONG Address
NVM Address to read data from 
- BYTE Return


NVMSendChar

NVMSendChar
Send a byte to the non-volatile memory device on the EB013 SPI E-block. 
- ULONG Address
NVM Address to write data to 
- BYTE Data
Data Byte to write to the sepected memory location 
- VOID Return


SendChar

SendChar
General purpose SPI send byte macro 
- BYTE Char
 
- VOID Return


SendString

SendString
Sends a string of bytes to the SPI bus 
- STRING Str
 
- VOID Return


UnInitialise

UnInitialise
Deactivates the SPI peripheral leaving the I/O pins in a state where they can be used for general purpose I/O. 
- VOID Return


Property reference

Properties
Connections
Channel
SPI Channel selector 
MOSI
SPI Data Out Pin SDO - Also Known as Master Out Slave In (MOSI) when used in Master mode. 
MISO
SPI Data In Pin SDI - Also Known as Master In Slave Out (MISO) when used in Master mode. 
CLK
SPI Clock Pin CLK - The Clock signal is driven by the SPI master. 
DAC En
DAC enable pin - only used with the EB013 SPI E-block 
NVM En
NVM enable pin - only used with the EB013 SPI E-block 
Bus Settings
Board Version
The Latest version of the E-block have a newer NVM IC which requires 3 address bytes instead of 2 address bytes. If you find that the NVM is not responding to commands then try changing the version property to match the version of the E-block. The version is written on the board as EB013-00-X where X is the version number. 
Prescale
Prescale option selector 
Clock Phase
Clock Phase (data change edge) selection 
Clock Polarity
Clock Polarity setting, inactive (idle) state 
Sample Point
Data bit read sample point 
Simulation
Label
Label used to identify the component on the panel. 
Scope Traces
Selects if the scope traces are automatically generated or not 
Console Data
Selects if the console data is automatically generated or not 
API