Go Down

Topic: Using 2nd hardware serial port in Arduino IDE on MEGA1284P (Read 46 times) previous topic - next topic

lastchancename

I've used multiple serial ports on MEGA 1280 / 2560 in the past - and have built several project with BOBUINO platform for the ATMEGA-1284P - which has TWO hardware UARTs, but I looked around in the hardware folder, but couldn't find a recommended way to use Serial1...

'Serial2' was not declared.. etc

Which is not really a surprise, but does anyone know where / what I need to patch in the core files, or is there an add-in library to support the second port?

OK - I could use SoftwareSerial, but the hardware UART is already there - it seems like a good idea to use it!

Many thanks in advance if anyone has some tips or experience!

Whandall

Wouldn't the two hardware ports be named Serial and Serial1?

Why do you wonder about Serial2 (which would be the third port)?
Ah, this is obviously some strange usage of the word 'safe' that I wasn't previously aware of. (D.Adams)

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!

Arduino
via Egeo 16
Torino, 10131
Italy