xeffect:
I am using APM 2.6 which has ATMEGA Aurdino based controller 2650. All the 4 UARTS are used for the various purpose and I need another UART. Just to test the functionality of the SoftwareSerial I have compiled its code as
Do you mean it's actually an Arduino Mega2650 (or a clone of it),? Or are you saying it's "something like" an Arduino. Mainly, I am asking if the pins are the same.
If it's a Mega2650 or clone...
This paragraph in the code
Not all pins on the Mega and Mega 2560 support change interrupts,
so only the following can be used for RX:
10, 11, 12, 13, 50, 51, 52, 53, 62, 63, 64, 65, 66, 67, 68, 69
and this statement
SoftwareSerial mySerial(3,4); // RX, TX
would seem to be at odds.