Pages: [1]   Go Down
Author Topic: Using extra serial pins on mega board  (Read 1805 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 2
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

London
Offline Offline
Faraday Member
**
Karma: 8
Posts: 6240
Have fun!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You access it using the hardware serial library using the following names for the ports:

Port Name   Transmit Pin       Receive Pin
Serial          1(Also USB)        0 (Also USB)
Serial1         18                 19
Serial2         16                 17
Serial3         14                 15
« Last Edit: May 08, 2009, 07:41:39 am by mem » Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 2
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Great, thanks!

Bruce
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 6
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

D.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 6
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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).
Logged

nr Bundaberg, Australia
Offline Offline
Tesla Member
***
Karma: 121
Posts: 8452
Scattered showers my arse -- Noah, 2348BC.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

 
Quote
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?
« Last Edit: August 08, 2010, 08:56:57 pm by graynomad » Logged

Rob Gray aka the GRAYnomad www.robgray.com

Pages: [1]   Go Up
Jump to: