Main Content

Legacy Serial Port F

Send and receive data over Mainboard Baseboard serial port with FIFO

  • Library:
  • Simulink Real-Time / RS232 / Mainboard

Description

The Send/Receive FIFO block sets up the serial interface to send and receive character and binary streams. It transmits input data as does the Send/Receive block, but it propagates received data through FIFO outputs.

A model that contains a Send/Receive FIFO block with the FIFO Read block provides the same capability as the Send/Receive block. A model that contains a Send/Receive FIFO block with a FIFO Read HDRS or FIFO Read Binary block provides greater capability than the Send/Receive block.

Ports

Input

expand all

Vector of data to transmit over port.

Output

expand all

FIFO containing data that has been received from serial port.

Parameters

expand all

This parameter specifies the port for which you want to view or modify parameters.

Programmatic Use

Block Parameter: port

Select a baud for transmitting and receiving data through the modem.

Programmatic Use

Block Parameter: baud

Select the number of bits that encode a character.

Programmatic Use

Block Parameter: width

Select the number of stop bits for the character stream.

Programmatic Use

Block Parameter: nstop

Select a parity for checking data integrity.

Programmatic Use

Block Parameter: parity

To enable the RTS/CTS handshake of the UART for flow control, select this check box. Serial controllers use the RTS/CTS handshake to prevent data loss due to hardware FIFO overflow on the device that you are sending to.

Usually, the interrupt service routine executes quickly enough to empty the FIFO. However, if your model gets FIFO overruns, select this check box.

Programmatic Use

Block Parameter: ctsmode

This parameter specifies the port for which you want to view or modify parameters. On the Simulink® block, the upper port is port 1 and the lower port is port 2.

Programmatic Use

Block Parameter: port

This parameter specifies the data type of the transmitter. The 8-bit data types require a NULL-terminated character vector in the input vector.

The 16-bit and 32-bit data types reserve the first full element to contain the number of elements to expect in the rest of the input vector. Only the low-order byte of each data element is sent. Setting this data type allows a wider data type to hold the bytes.

If the data stream requires a NULL byte, select one of the 16-bit or 32-bit data types. Because the 8-bit data types are NULL terminated character vectors, the NULL byte would terminate the character vector.

Programmatic Use

Block Parameter: idtype

Enter the base sample time or a multiple of the base sample time. -1 means that sample time is inherited.

Programmatic Use

Block Parameter: sampletime
Introduced in R2008a