Main Content

Serial port properties

Set the serial port properties of an Arduino® board to effectively manage serial data communication between an Arduino board and host computer. These properties include baud rate, serial data frame configuration, and transmitter and receiver pin configuration for serial communication.

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 BoardsSupported Serial Ports
Arduino Due, Arduino Mega 2560, Arduino Mega ADKSerial ports 0, 1, 2, and 3
Arduino Leonardo, Arduino MKR WiFi 1010, Arduino MKR 1000, Arduino MKR Zero, Arduino Micro, Arduino Nano 33 BLE Sense, Arduino Nano 33 IoT, Arduino Nano RP2040 Connect, Arduino Robot Control Board, Arduino Robot Motor Board, Arduino Uno R4 Minima, Arduino Uno R4 WiFiSerial ports 0 and 1
Arduino Nano 3.0, Arduino UnoSerial port 0
ESP32-WROOM (Arduino Compatible), ESP32-WROVER (Arduino Compatible), Raspberry Pi® Pico (Arduino Compatible), Raspberry Pi Pico W (Arduino Compatible)Serial ports 0, 1, and 2
Teensy 4.0 (Arduino Compatible), Teensy 4.1 (Arduino Compatible)Serial ports 0, 1, 2, 3, 4, 5, 6, 7, and 8

Serial Baud Rate

Set the baud rate of the serial port on the Arduino hardware.

If you set Set host COM port to Manually, then set Serial 0 baud rate as described in Manually Configure COM Port and Bootloader on Host.

For information on serial ports for different Arduino boards, see Pin Mapping for Arduino Timer-Independent Blocks.

Settings

Default: 9600

300, 1200, 2400, 4800, 9600, 14400, 19200, 28800, 38400, 57600, 76800, 115200, Specify

You can also manually specify the baud rate of a serial port. Select Specify from the drop-down list and enter the value in the box.

Serial Configuration

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_8N1 indicates 8-bit data communication with no parity bits and one stop bit.

  • SERIAL_7E2 indicates 7-bit data communication with even parity bits and two stop bits.

  • SERIAL_6O2 indicates 6-bit data communication with odd parity bits and two stop bits.

Settings

Default: SERIAL_8N1

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_8O2

Supported Arduino Boards

To enable this parameter, set the Hardware board parameter in the Configuration Parameters dialog box to any one of the Arduino boards listed in this table.

Arduino DueArduino Mega 2560Arduino Mega ADK
Arduino LeonardoArduino MKR WiFi 1010Arduino MKR 1000
Arduino MKR ZeroArduino MicroArduino Nano 33 BLE Sense
Arduino Nano 33 IoTArduino Nano RP2040 ConnectArduino Robot Control Board
Arduino Robot Motor BoardArduino Uno R4 MinimaArduino Uno R4 WiFi
Arduino Nano 3.0Arduino UnoESP32-WROOM (Arduino Compatible)
ESP32-WROVER (Arduino Compatible)Raspberry Pi Pico (Arduino Compatible)Raspberry Pi Pico W (Arduino Compatible)

Arduino Due supports only these serial data frame configurations: SERIAL_8N1, SERIAL_8E1, SERIAL_8O1, SERIAL_8M1, SERIAL_8S1.

Serial Tx and Rx Pins

Set the serial port transmitter and receiver pin numbers of your Arduino board.

This table lists the Arduino boards that support configuring the Tx and Rx pins for ports 0, 1, and 2.

Supported Arduino BoardsSerial Port 0Serial Port 1Serial Port 2
 Tx PinsRx PinsTx PinsRx PinsTx PinsRx Pins
ESP32-WROOM (Arduino Compatible), ESP32-WROVER (Arduino Compatible)1 (default), 0, 2-5, 12-19, 21-23, 25-27, 32-36, 393 (default), 0-2, 4-5, 12-19, 21-23, 25-27, 32-36, 3933 (default), 0-5, 12-19, 21-23, 25-27, 32, 33, 34-36, 3932 (default), 0-5, 12-19, 21-23, 25-27, 33-36, 3917 (default), 0-5, 12-16, 19, 21-23, 25-27, 32-36, 3916 (default), 0-5, 12-15, 17, 19, 21-23, 25-27, 32-36, 39
Raspberry Pi Pico (Arduino Compatible), Raspberry Pi Pico W (Arduino Compatible)USBUSB0 (default), 12, 161 (default), 13, 178 (default), 49 (default), 5