No data on Serial Monitor programming ATTiny85 with Arduino Mega

Hello,

I’ve read all over the internet but I can’t find a solution to this problem.

I have Arduino IDE v1.0.5. r2, and a Arduino Mega 2560 as ISP to program an ATtiny85. I don’t have problems programing the ATtiny85, but I need to known the output data at Serial Monitor.

I use the library TinyDebugSerial for debuging:

#include <TinyDebugSerial.h>
TinyDebugSerial mySerial = TinyDebugSerial();
void setup() {
mySerial.begin( 9600 );
}
void loop() {
mySerial.print(“Sent :”);
mySerial.println(buffer);
}

But when I connect pin ‘PB3’ (real 2) of the ATtiny85 and the pin ‘TX0->’ of the Arduino Mega 2560, but i don’t have data. I try to put a 220ohm resistor between the pins without exit.

Any idea?

Thanks,

Try this. but since you have a mega you don't need sofware serial. You can use one of your three extra serial ports in the mega.

Hi Raschemmel,
The software serial is for the ATtiny85, not for the Arduino Mega 2560.

I tried to program my ATtiny85 with the example. I connected ‘PB4’ (tx) with ‘TX0->’ (tx to tx), but the serial communication with the Arduino IDE (using Mega 2560) doesn’t work… :(.

#include <SoftwareSerial.h>
SoftwareSerial mySerial(3,4); //rx, tx
void setup()
{
mySerial.begin(9600);
}
void loop()
{
mySerial.println(“hello world”);
delay(1000);
}

Thanks for your help i really appreciate it!!

rataweb:
I tried to program my ATtiny85 with the example. I connected 'PB4' (tx) with 'TX0->' (tx to tx), but the serial communication with the Arduino IDE (using Mega 2560) doesn't work... :(.

I'm not surprised. You're connecting two outputs. You need to connect an output to an input...tx to rx (and rx to tx for 2-way comms).

DOOOH !
Did you try the example at the link I posted ? That worked for me.

Yes, but I don't know why it doesn't work!!!!

In the example, the owner put:

To use Software Serial you must have set the internal oscillator to 8MHz.

But I don't know how to do it...

Thanks,

To have the tiny85 run at 8MHz change the low fuse byte from 0x62 to 0xe2.

I didn't know how to do that so I got an 8Mz board file from another forum member and put that in my board file.