Jump to content

Component: MULTIUART (SPI2UART) (Comms: Interface): Difference between revisions

From Flowcode Help
m Text replacement - "class="wikitable" style="width:60%; background-color:#FFFFFF;"" to "class="mtx-class-macrotable wikitable""
m Text replacement - "style="background-color:#EAE1EA;"" to "class="mtx-class-propfolder""
 
(4 intermediate revisions by the same user not shown)
Line 92: Line 92:
{| class="mtx-class-macrotable wikitable"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[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;" | '''CheckRx'''
| width="90%" class="mtx-class-macrohead" | '''CheckRx'''
|-
|-
| colspan="2" | Returns the number of received bytes held in queue for the selected channel. 
| colspan="2" | Returns the number of received bytes held in queue for the selected channel. 
Line 111: Line 111:
{| class="mtx-class-macrotable wikitable"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[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;" | '''CheckTx'''
| width="90%" class="mtx-class-macrohead" | '''CheckTx'''
|-
|-
| colspan="2" | Returns the number of bytes held in the transmit queue for the selected channel. 
| colspan="2" | Returns the number of bytes held in the transmit queue for the selected channel. 
Line 130: Line 130:
{| class="mtx-class-macrotable wikitable"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[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 144: Line 144:
{| class="mtx-class-macrotable wikitable"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[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;" | '''ReceiveByte'''
| width="90%" class="mtx-class-macrohead" | '''ReceiveByte'''
|-
|-
| colspan="2" | Returns the first received byte held in queue for the selected channel. Recommended to use the CheckRx macro first to collect number of bytes. 
| colspan="2" | Returns the first received byte held in queue for the selected channel. Recommended to use the CheckRx macro first to collect number of bytes. 
Line 163: Line 163:
{| class="mtx-class-macrotable wikitable"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[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;" | '''ReceiveString'''
| width="90%" class="mtx-class-macrohead" | '''ReceiveString'''
|-
|-
| colspan="2" | Returns a string of received bytes held in queue for the selected channel. Recommended to use the CheckRx macro first to collect number of bytes. 
| colspan="2" | Returns a string of received bytes held in queue for the selected channel. Recommended to use the CheckRx macro first to collect number of bytes. 
Line 187: Line 187:
{| class="mtx-class-macrotable wikitable"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[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;" | '''SetBaud'''
| width="90%" class="mtx-class-macrohead" | '''SetBaud'''
|-
|-
| colspan="2" | Adds a byte to the transmit queue for the selected channel. 
| colspan="2" | Adds a byte to the transmit queue for the selected channel. 
Line 211: Line 211:
{| class="mtx-class-macrotable wikitable"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[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;" | '''TransmitByte'''
| width="90%" class="mtx-class-macrohead" | '''TransmitByte'''
|-
|-
| colspan="2" | Adds a byte to the transmit queue for the selected channel. 
| colspan="2" | Adds a byte to the transmit queue for the selected channel. 
Line 235: Line 235:
{| class="mtx-class-macrotable wikitable"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[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;" | '''TransmitString'''
| width="90%" class="mtx-class-macrohead" | '''TransmitString'''
|-
|-
| colspan="2" | Adds a byte to the transmit queue for the selected channel. 
| colspan="2" | Adds a byte to the transmit queue for the selected channel. 
Line 260: Line 260:
{| class="mtx-class-macrotable wikitable"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" | [[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'''  
|-
|-
|-
|-
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]]
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Bus Settings
| width="90%" class="mtx-class-propfolder" | Bus Settings
|-
|-
|-
|-
Line 278: Line 278:
| colspan="2" | Prescale option selector 
| colspan="2" | Prescale option selector 
|-
|-
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]]
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Connections
| width="90%" class="mtx-class-propfolder" | Connections
|-
|-
|-
|-
Line 317: Line 317:
| colspan="2" | Chip Select / Slave Select Pin  Master Mode: General purpose output pin used to select the remote SPI device. Slave Mode: Hardware chip select pin input used to select the SPI device.  
| colspan="2" | Chip Select / Slave Select Pin  Master Mode: General purpose output pin used to select the remote SPI device. Slave Mode: Hardware chip select pin input used to select the SPI device.  
|-
|-
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]]
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Simulation
| width="90%" class="mtx-class-propfolder" | Simulation
|-
|-
|-
|-

Latest revision as of 14:36, 13 July 2026

Author Matrix TSL
Version 2.0
Category Comms: Interface


MULTIUART component

Uses a high speed SPI connection to enable up to four buffered external UARTs via the MULTIUART modules.

Component Source Code

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

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

Detailed description

No detailed description exists yet for this component

Examples

Simple test program







Macro reference

CheckRx

CheckRx
Returns the number of received bytes held in queue for the selected channel. 
- BYTE UART
UART Index Range: 0-3 
- BYTE Return


CheckTx

CheckTx
Returns the number of bytes held in the transmit queue for the selected channel. 
- BYTE UART
UART Index Range: 0-3 
- BYTE Return


Initialise

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


ReceiveByte

ReceiveByte
Returns the first received byte held in queue for the selected channel. Recommended to use the CheckRx macro first to collect number of bytes. 
- BYTE UART
UART Index Range: 0-3 
- BYTE Return


ReceiveString

ReceiveString
Returns a string of received bytes held in queue for the selected channel. Recommended to use the CheckRx macro first to collect number of bytes. 
- BYTE UART
UART Index Range: 0-3 
- BYTE NumBytes
 
- STRING Return


SetBaud

SetBaud
Adds a byte to the transmit queue for the selected channel. 
- BYTE UART
UART Index Range: 0-3 
- BYTE Baud
0=1200, 1=2400, 2=4800, 3=9600, 4=19200, 5=38400, 6=57600, 7=115200 
- VOID Return


TransmitByte

TransmitByte
Adds a byte to the transmit queue for the selected channel. 
- BYTE UART
UART Index Range: 0-3 
- BYTE Data
 
- VOID Return


TransmitString

TransmitString
Adds a byte to the transmit queue for the selected channel. 
- BYTE UART
UART Index Range: 0-3 
- STRING Data
 
- VOID Return


Property reference

Properties
Bus Settings
Channel
SPI Channel selector 
Prescale
Prescale option selector 
Connections
MOSI
SPI Data Out Pin SDO - Also Known as Master Out Slave In (MOSI) when used in Master mode. 
MOSI Remap Pin
Select which the target pin to assign the MOSI hardware pin functionality. 
MISO
SPI Data In Pin SDI - Also Known as Master In Slave Out (MISO) when used in Master mode. 
MISO Remap Pin
Select which the target pin to assign the MISO hardware pin functionality. 
CLK
SPI Clock Pin CLK - The Clock signal is driven by the SPI master. 
CLK Remap Pin
Select which the target pin to assign the CLK hardware pin functionality. 
CS / SS
Chip Select / Slave Select Pin Master Mode: General purpose output pin used to select the remote SPI device. Slave Mode: Hardware chip select pin input used to select the SPI device.  
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