Go Down

Topic: How to program Due serial ports (Read 4699 times) previous topic - next topic


In my own clumsy way, I quote here from the Serial section of the Language reference.

"The Arduino Due has three additional 3.3V TTL serial ports: Serial1 on pins 19 (RX) and 18 (TX); Serial2 on pins 17 (RX) and 16 (TX), Serial3 on pins 15 (RX) and 14 (TX). Pins 0 and 1 are also connected to the corresponding pins of the ATmega16U2 USB-to-TTL Serial chip, which is connected to the USB debug port. Additionally, there is a native USB-serial port on the SAM3X chip, SerialUSB'. "
This is all of interest to me but useless if I don't know how to program the several ports. There is no hint that I could see on the associated functions/methods appropriate to these Due ports. There should be some kind of hyperlink here. I also get the feeling that some of these ports have different names in other places.

Are pins 0 and 1 really connected to two different ports?
Where is more documentation of the debug port? Is this the Serial Monitor?
How is the word SerialUSB related to the native port? Is it a software keyword?
From browsing documentation for other boards I gather that, for example, Serial1.begin() would activate pins 18 and 19. Is that correct?

Thank you for any information.


Hi grimdon,

I think all answers are in these 3 links:

But I'm right with you, it's difficult to understand, it's complex schemas.
I've tried some cases and I can confirm that docs are right.

Case of Serial1, Serial2 and Serial3 are simple: The pins 14 to 19 are connected to the AVR and can have other usages.

Case of Serial is more complex: Pins 0 and 1 are connected to the AVR and to the USB programming port. If the USB programming port is in use (when you program the AVR or when you communicate with the AVR), pins 0 and 1 are connected to the programming port and don't be used for any other usages.

Case of SerialUSB is different: No pins are used and you must use the native USB port to communicate with the AVR.

Take care of special RESET/ERASE actions at 1200Bps on the USB programming port and the USB native port.

Take care of NO RESET action at open/close of the USB native port.

Go Up