Component: MULTIUART (SPI2UART) (Comms: System)
Author | Matrix Ltd |
Version | 1.3 (Release) |
Category | Comms: System |
Contents
MULTIUART (SPI2UART) component
Uses a high speed SPI connection to enable up to four buffered external UARTs via the MULTIUART modules.
Examples
No additional examples
Downloadable macro reference
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.
Parameters
- BYTE UART
- UART Index Range: 0-3
Return value
TransmitString
Adds a byte to the transmit queue for the selected channel.
Parameters
- BYTE UART
- UART Index Range: 0-3
- <- STRING Data
- This parameter may be returned back to the caller
Return value
- This call does not return a value
SetBaud
Adds a byte to the transmit queue for the selected channel.
Parameters
- 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
Return value
- This call does not return a value
TransmitByte
Adds a byte to the transmit queue for the selected channel.
Parameters
- BYTE UART
- UART Index Range: 0-3
- BYTE Data
Return value
- This call does not return a value
CheckRx
Returns the number of received bytes held in queue for the selected channel.
Parameters
- BYTE UART
- UART Index Range: 0-3
Return value
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.
Parameters
- BYTE UART
- UART Index Range: 0-3
- BYTE NumBytes
Return value
CheckTx
Returns the number of bytes held in the transmit queue for the selected channel.
Parameters
- BYTE UART
- UART Index Range: 0-3
Return value
Initialise
Activates the SPI peripheral and claims control over the I/O pins.
Parameters
- This macro has no parameters
Return value
- This call does not return a value
Simulation macro reference
GetConsoleHandle
Gets the handle to the console allowing data displaying on the panel etc.
Parameters
- This macro has no parameters
Return value
Property reference
SPI Channel
This property is of type Fixed list of ints and can be referenced with the variable name CHANNEL.
SPI peripher onboard the target microcontroller to use.
Prescale
This property is of type Fixed list of ints and can be referenced with the variable name PR_SCALE.
Rate by which the master oscillator is reduced before clocking the SPI peripheral.
MOSI (SDO)
This property is of type Single digital pin and can be referenced with the variable name MOSI.
Data Out Pin - Micro Out Serial In
MISO (SDI)
This property is of type Single digital pin and can be referenced with the variable name MISO.
Data In Pin - Micro In Serial Out
CLK
This property is of type Single digital pin and can be referenced with the variable name CLK.
Clock Pin
CS
This property is of type Single digital pin and can be referenced with the variable name CS.
No additional information
Label
This property is of type Line of text and can be referenced with the variable name label.
Label used to identify the component on the panel.
Scope Traces
This property is of type True or false and can be referenced with the variable name ScopeTraces.
Selects if the scope traces are automatically generated or not
Console Data
This property is of type True or false and can be referenced with the variable name ConsoleData.
Selects if the console data is automatically generated or not
Injector
This property is of type Fixed list of ints and can be referenced with the variable name Injector.
Injector component to allow the data in simulation to be passed to something meaningful.