SoftwareSerial on 8mhz Atmega328p

Hi, I'm getting garbage text when trying to read Rx pin using softwareserial.

Fyi, the microcontroller uses internal 8mhz clock. Wonder that's the issue.

Please advise with any workaround.


The Setup

-Esp8266 transmit some data via Tx pin to atmega328p microcontroller in 4800 baudrate. -Pin 11 in MC configured using Softwareserial to read values but only garbage is receiving. -MC uses 8mhz internal clock. No external oscillator.

Highly appreciate any workaround/advise.

Thanks

It is possible that the internal RC clock is so far off that the baud rate is also too far off.

However, double check that you have matched the baud rates on both ends. Then try reducing the baud rate on both ends, e.g. to 2400 or even lower. The lower the baud rate, the less sensitive serial transmission is to clock inaccuracies.

You have to edit boards.txt for your board. See the other thread about using the internal RC oscillator.

Hi jremington,
Both ends have same baudrate.
And the arduino serial.write function works fine.
Hence I believe RC clock is on? Please correct me if i’m wrong.

Hi DrDiettrich,
I was able to upload sketches without any issue by selecting the “Nano” board from IDE.
Is it good enough if that works?

Hi Both, Issue was with the board as you have advised. I used "Lilypad Nano" to upload my sketch (i had trouble modifying existing boards.txt) and it worked fine and able to receive a message successfully.

Many thanks for your advise!