Connecting software serial pins to hardware serial pins

I have uno with an app which accepts commands via the USB from a PC and returns a response to the PC

I want to run the uno using software serial on a Mega (pins 11 and 12) wired to pins 1 and 0 on the Uno. With no PC connected to the USB

When I send a command from the mega it is accepted and executed correctly, but if I try to read the response from the uno on the software serial I usually get garbage, although sometimes I see a correct message.

Baud rate 115200.

all and any comments will be very welcome

thank-you

David

If you have a Mega, why in the world use software serial. The Mega has 3 other hardware serial ports (Serial1, Serial2 and Serial3) besides the USB Serial. Software serial won't run anywhere near 115200 baud anyway. Pins 0 and 1 in the Uno are hardware serial so will handle 115200 (or more) with no trouble. You are not trying to connect the Uno Serial to both the Mega and the serial monitor at the same time are you?

Thank-you - you are absolutely right - but my application needs as many interrupt pins as it can get - hence
my attempted use of softwareSerial - the Mega also carries an adafruit TFT touch screen - which blanks out
some of the Mega pins (outside those of a Uno)- or rather the prototyping shield on which it is mounted with wired screw connections does, on its own the TFT screen blocks access to all the Uno level pins!

If I am forced to use software serial I hope it will be OK at lower baud rate

Thank-you for your reply

David

The best, reliable, baud rate that I have seen for software serial (that comes with the IDE) is 38400 baud. There are a couple of alternate soft serial libraries but I don't know if they are any faster.

https://www.pjrc.com/teensy/td_libs_AltSoftSerial.html