Configure host-side serial communications interface for host-side SCI Transmit and SCI Receive blocks
Embedded Coder / Embedded Targets / Host Communication
The SCI Setup block standardizes the serial communications interface (COM port) settings for use by the host-side SCI Transmit and SCI Receive blocks. This block is a standalone block that sets up one configuration for a COM port that SCI Transmit and SCI Receive blocks share. This block prevents conflicting configurations for the SCI Transmit and SCI Receive blocks. For example, the host-side SCI Transmit block cannot use COM1 with settings that differ from the COM1 settings used by the host-side SCI Receive block.
Communication Mode— Communication mode to use for data transmissions
Specify the communication mode to use for data transmissions. The communication mode
raw data or
data if you want the transmitting side to send unformatted data whenever the
transmitting side is ready to send, whether the receiving side is ready or not. Without
a wait state, deadlocks do not occur. Data transmission is asynchronous. With
raw data mode, it is possible for the receiving side to miss data.
If the data is noncritical, using
raw data mode can avoid blocking
When you specify
protocol mode, handshaking between host and
target computers occurs. The transmitting side sends
indicating that it is ready to transmit. The receiving side sends back
$RDY, indicating that it is ready to receive. The transmitting side
then sends data and, when the transmission is completed, the receiving side sends a
Advantages to using
protocol mode include:
Data is received as expected (checksum).
Data is received by the target computer.
Time consistency; each side waits for its turn to send or receive.
Deadlocks can occur if an SCI Transmit block tries to communicate with more than
one SCI Receive block on different COM ports when both SCI Receive blocks are blocking
protocol mode). Deadlocks cannot occur on the same COM
Baud rate— Baud rate of COM port
Specify the baud rate of the COM port.
Number of stop bits— Number of stop bits used by COM port
Specify the number of stop bits that the COM port uses.
Parity mode— Parity mode used by COM port
Specify the parity mode that the COM port uses.
Timeout— Wait time for
When you specify
protocol for Communication
mode, specify a value greater than or equal to 0, which indicates the
number of seconds the transmitting side waits for an acknowledgement from the receiving
side and how long the receiving side waits for data. The system displays a warning
message each time a wait period exceeds the timeout value.
This block does not support code generation. The block is supported for simulations on a host development computer only.