Difference between revisions of "Component: MULTIUART (SPI2UART) (Comms: System)"
(XML import) |
|||
Line 21: | Line 21: | ||
==Examples== | ==Examples== | ||
− | + | ||
+ | {{Fcfile|MULTIUART Test.fcfx|Simple test program}} | ||
+ | |||
Revision as of 22:39, 20 December 2018
Author | Matrix TSL |
Version | 2.0 (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
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
This component does not contain any simulation macros
Property reference
Channel
This property is of type Fixed list of ints and can be referenced with the variable name cal_spi::CHANNEL.
SPI Channel selector
Prescale
This property is of type Fixed list of ints and can be referenced with the variable name cal_spi::PR_SCALE.
Prescale option selector
MOSI
This property is of type Single digital pin and can be referenced with the variable name cal_spi::MOSI.
SPI Data Out Pin SDO - Also Known as Master Out Slave In (MOSI) when used in Master mode.
MISO
This property is of type Single digital pin and can be referenced with the variable name cal_spi::MISO.
SPI Data In Pin SDI - Also Known as Master In Slave Out (MISO) when used in Master mode.
CLK
This property is of type Single digital pin and can be referenced with the variable name cal_spi::CLK.
SPI Clock Pin CLK - The Clock signal is driven by the SPI master.
CS / SS
This property is of type Single digital pin and can be referenced with the variable name cal_spi::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.
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 cal_spi::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 cal_spi::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 cal_spi::Injector.
No additional information