Go Down

Topic: Using extra serial pins on mega board (Read 2413 times) previous topic - next topic

Bruce H

This may be a dumb question, but in order to use RX/TX1, RX/TX2 and RX/TX3 on a mega board do I use the software serial library?  I guess I get confused when people say the mega board has 3 extra sets of RX/TX pins, but as far as I can tell, I don't see any way to access those extra pins using the normal serial library or even anything to say whether the atmel chip treats those pins any differently than any other pins.


May 08, 2009, 02:40 pm Last Edit: May 08, 2009, 02:41 pm by mem Reason: 1
You access it using the hardware serial library using the following names for the ports:
[font=Courier New]
Port Name   Transmit Pin       Receive Pin
Serial          1(Also USB)        0 (Also USB)
Serial1         18                 19
Serial2         16                 17
Serial3         14                 15


Is it possible to use serial1 instead of serial to load program? I would like to use one serial for xbee, other for usb and third for gps... But both serials    ( serial and serial 1 ) should be for program loading into arduino mega.

Thank you in advance for help



You can't have anything plugged into Serial when uploading firmware, figured that out after trying to use a Sparkfun BlueSmirf serial adaptor to upload code wirelessly (would have been cool but it doesn't work).


Aug 09, 2010, 03:53 am Last Edit: Aug 09, 2010, 03:56 am by graynomad Reason: 1
Is it possible to use serial1 instead of serial to load program?

In theory yes, but you'd have to modify the boot loader. But with an extra 3 ports is there any need to?
Rob Gray aka the GRAYnomad www.robgray.com

Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131