Serial Configuration
R2026bData frame configuration for serial port communication
Since R2023a
Model Configuration Pane: Hardware Implementation / Hardware board settings / Target hardware resources / Serial port properties
Description
Select the data frame configuration for serial port communication. The first digit indicates the number of bits in each data packet. The second digit indicates the parity bits present in the data packet. The last digit indicates the number of stop bits in each data packet. For example:
SERIAL_8N1indicates 8-bit data communication with no parity bits and one stop bit.SERIAL_7E2indicates 7-bit data communication with even parity bits and two stop bits.SERIAL_6O2indicates 6-bit data communication with odd parity bits and two stop bits.
For every serial port, you can individually configure the baud rate and data frame configuration. However, not all Arduino® boards support all serial ports. This table lists the serial ports supported by different Arduino boards. Set the Hardware board parameter in the Configuration Parameters dialog box to any one of these boards to enable the serial port.
| Arduino Boards | Supported Serial Ports |
|---|---|
| Serial ports 0, 1, 2, and 3 |
| Serial ports 0 and 1 |
| Serial port 0 |
| Serial ports 0, 1, and 2 |
| Serial ports 0, 1, 2, 3, 4, 5, 6, 7, and 8 |
Settings
SERIAL_8N1 (default) | SERIAL_5N1 | SERIAL_6N1 | SERIAL_7N1 | SERIAL_5N2 | SERIAL_6N2 | SERIAL_7N2 | SERIAL_8N2 | SERIAL_5E1 | SERIAL_6E1 | SERIAL_7E1 | SERIAL_8E1 | SERIAL_5E2 | SERIAL_6E2 | SERIAL_7E2 | SERIAL_8E2 | SERIAL_5O1 | SERIAL_6O1 | SERIAL_7O1 | SERIAL_8O1 | SERIAL_5O2 | SERIAL_6O2 | SERIAL_7O2 | SERIAL_7O2Arduino Due supports only these serial data frame configurations: SERIAL_8N1, SERIAL_8E1, SERIAL_8O1, SERIAL_8M1, SERIAL_8S1.
Programmatic Use
| No programmatic use is available. |
Version History
Introduced in R2023a