SoftwareSerial on Attiny85 with Serial Monitor

Hi,

I'm trying to check if SoftwareSerial is working on my Attiny85, so I uploaded this sketch to it (using an Arduino as ISP, set attiny to 8 MHz, internal oscillator, BOD disabled, and did "Burn Bootloader" before) which seemed to upload fine:

#include <SoftwareSerial.h>
// Definitions
#define rxPin 3
#define txPin 4

SoftwareSerial mySerial(rxPin, txPin);


// the setup routine runs once when you press reset:
void setup() {                
  mySerial.begin(9600);
}

// the loop routine runs over and over asensorpingain forever:
void loop() {
  mySerial.print("Stuff");
  mySerial.println();
}

Then on my Arduino, I uploaded the basically blank program (except for an LED flash to make sure it's running) and that uploaded okay too:

int ledPin = 12;

void setup() {
 pinMode(ledPin, OUTPUT);
 
 digitalWrite(ledPin, HIGH);
 delay(3000);
 digitalWrite(ledPin, LOW);
}

void loop() {

}

Then I hooked up GND to GND, 5V to 5V, and RX (pin 3, literal pin 2 on the attiny) to RX on the Arduino Micro, and TX (pin 4, literal pin 3) to TX on the Arduino Micro.

Then I opened Serial Monitor, but there was no output. Am I missing a step? Thank you

I see no serial port setup in the Arduino code. You need one software serial port to connect to the micro and the hardware serial port to talk to the serial monitor. The software port would be arduinoe RX to micro tx and arduino tx to micro rx. Look at the software serial examples that come with the IDE.

OP is trying to use Arduino as TTL to USB bridge, that's why he connected TX to TX and RX to RX and uploaded a "blank" sketch, so Arduino wouldn't interfere with attiny serial.

This won't work with Arduino Micro because RX and TX (Serial1) is another port separated from Serial (USB)

You have to use Arduino as a bridge but via "software", upload an sketch that listen to the RX TX port (listening to attiny), and the print using the USB COM port.

Edit: this is what the official website says about the serial ports on arduino micro:

Serial: 0 (RX) and 1 (TX). Used to receive (RX) and transmit (TX) TTL serial data using the ATmega32U4 hardware serial capability. Note that on the Micro, the Serial class refers to USB (CDC) communication; for TTL serial on pins 0 and 1, use the Serial1 class.

As a example code I'd do something like this (NOT TESTED):

char anyChar;

void setup(){
   Serial.begin(9600);   //to serial monitor
   Serial1.begin(9600);  //connected to Attiny (RX to tx and TX to rx)
}

void loop(){
   if(Serial1.available() >0) {
     anyChar = Serial1.read();
     Serial.print(anyChar);
   }
}

I testen this 'monitor fuction' on the UNO and it works fine if you ONLY use Serial. and forget the Serial1..

This is enough:

char anyChar;
void setup(){
Serial.begin(9600);
}
void loop(){
if(Serial.available() >0) {
anyChar = Serial.read();
Serial.print(anyChar);
}
}