Jump to content

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

From Flowcode Help
No edit summary
m Text replacement - "style="background-color:#EAE1EA;"" to "class="mtx-class-propfolder""
 
(7 intermediate revisions by 2 users not shown)
Line 17: Line 17:
==Component Source Code==
==Component Source Code==


Please click here to download the component source project: [https://www.flowcode.co.uk/wiki/componentsource/FC_Comp_Source_temp/MULTIUART.fcfx FC_Comp_Source_temp/MULTIUART.fcfx]
Please click here to download the component source project: [https://www.flowcode.co.uk/wiki/componentsource/FC_Comp_Source_MULTIUART.fcfx FC_Comp_Source_MULTIUART.fcfx]


Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/FC_Comp_Source_temp/MULTIUART.fcfx FC_Comp_Source_temp/MULTIUART.fcfx]
Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/FC_Comp_Source_MULTIUART.fcfx FC_Comp_Source_MULTIUART.fcfx]


==Detailed description==
==Detailed description==
Line 74: Line 74:


{{Fcfile|MULTIUART Test.fcfx|Simple test program}}
{{Fcfile|MULTIUART Test.fcfx|Simple test program}}




Line 86: Line 90:


===CheckRx===
===CheckRx===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| 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 105: Line 109:


===CheckTx===
===CheckTx===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| 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 124: Line 128:


===Initialise===
===Initialise===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| 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 138: Line 142:


===ReceiveByte===
===ReceiveByte===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| 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 157: Line 161:


===ReceiveString===
===ReceiveString===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| 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 181: Line 185:


===SetBaud===
===SetBaud===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| 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 205: Line 209:


===TransmitByte===
===TransmitByte===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| 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 229: Line 233:


===TransmitString===
===TransmitString===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| 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 250: Line 254:
| width="90%" style="border-top: 2px solid #000;" | ''Return''
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
|}




==Property reference==
==Property reference==


{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| 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 276: 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 315: 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