Go Down

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


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!
Experienced responders have a nose for laziness, (they were beginners once)... expecting the poster to contribute to the learning experience.


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