Garbage output when connecting Arduino Pro Mini to Uno over Serial

Hi,

I’m having troubles connecting Arduino Uno to Arduino Pro Mini (3.3v, 8MHz).
Basically, the Pro Mini sends “Hello” using Serial, and the Uno reads it using SoftwareSerial, then reports it to the console using Serial. With a logic analyzer I can see that the data gets to the Uno fine, however, the Uno prints garbage to the console.

Any idea?

Hardware setup (voltage dividers omitted for clarity):

+--------------+       +--------------+         
| Pro Mini     |       | Uno          |
|              |       |              |
| TX  RX       |       | 4   5        |
+-|---|--------+       +-|---|--------+
  |   |                  |   |
  |   +------------------|---+
  |                      |
  +----------------------+

Arduino Pro Mini program:

#include <Arduino.h>

void setup() {
  Serial.begin( 115200 );
}

uint32_t count = 0;
void loop() {
  if( count < 100 ) { 
    Serial.print( "Hello " + count++ );
    delay(100);
  }
}

Arduino Uno program:

#include <Arduino.h>
#include <SoftwareSerial.h>

#define PIN_RX  4
#define PIN_TX  5

SoftwareSerial _ss( PIN_RX, PIN_TX );
void setup() {
  Serial.begin( 115200 );
  
  pinMode( PIN_RX, INPUT );
  pinMode( PIN_TX, OUTPUT );
  _ss.begin( 115200 );
  _ss.listen();
}

void loop() {
  if( _ss.available() > 0 ) {
    Serial.write( _ss.read() );
  }
}

Thanks,
-S.

It turns out that the problem was that the size of the RX buffer of SoftwareSerial was too small. I changed it from 64 to 256 and now everything works fine.

-S.

You probably also should connect the grounds of the two boards together to have an appropriate current flow path between the two.