Attiny85 Serial Communication using Arduino UNO stopped working

I programmed the Attiny85 with the SoftwareSerial library and connected the software serial pins to RX/TX of an Arduino Uno. I was able to print to the serial monitor before and now it’s not working and I have no idea why. There are no errors, but nothing prints to the serial monitor and the horizontal scroll bar at the bottom of the serial monitor gets smaller as if it’s printing a lot.

Here is the Attiny85 code:

#include <SoftwareSerial.h>

#define rxPin 3
#define txPin 4

SoftwareSerial mySerial(rxPin, txPin);


void setup() {
  mySerial.begin(9600);
}


void loop()
{
 mySerial.println("hi");
 delay(500);
}

The Arduino Uno is running the bare minimum sketch. The baud rate on the serial monitor is set for 9600.

Here are the connections:
ATTINY85 pin 3 → Arduino Uno pin 0
ATTINY85 pin 4 → Arduino Uno pin 1
ATTINY85 GND → Arduino Uno GND


I accidentally posted this twice…

Moderator edit:
</mark> <mark>[code]</mark> <mark>

</mark> <mark>[/code]</mark> <mark>
tags added.

cooljam: I accidentally posted this twice...

I removed the other thread. (Replies go here.)

SoftwareSerial mySerial(rxPin, txPin);

The parameters are in the correct order... https://github.com/arduino/Arduino/blob/master/libraries/SoftwareSerial/SoftwareSerial.h#L83

mySerial.begin(9600);

The baud rate on the serial monitor is set for 9600.

The baud rates match.

ATTINY85 pin 3 -> Arduino Uno pin 0 ATTINY85 pin 4 -> Arduino Uno pin 1 ATTINY85 GND -> Arduino Uno GND

The grounds are connected. Transmit on the ATtiny85 (pin 4) is connected to TX on the Uno (pin 1) which is connected to RXD1 on the ATmega16U2.

There are just four possibilities left... 1. The ATtiny85 is not powered. Unlikely because you are getting data into Serial Monitor. 2. The ATtiny85 is running at a lower voltage (e.g. 3.3V instead of 5.0V). Doubtful because I suspect you would have mentioned if this was true. 3. The Arduino Uno is running something other than the bare minimum sketch. Unlikely because you appear to be very thorough. 4. The ATtiny85 is configured to run at a clock speed different from the clock speed specified when the sketch was built (e.g. ATtiny85 is running at 1 MHz; sketch was built for 8 MHz).

My guess is #4.

what about your schematic on Attiny85 ?? crystall that you use??

Wow I forgot to do the "Burn Bootloader" under Tools to use the Attiny85's internal 8MHz! I'm using a new chip and it's been so long I forgot that step :grin: Thank you!!!

You are welcome. Glad to know you are back on track.