ATtiny84 and TinyDebugSerial shows garbled text....

Hi,
I have a ATtiny84 and I am using an Arduino UNO as the ISP programmer (Thanks Coding Badly for the updated TinyISP, that works with Arduino 1.0). Anyhow, I have programmed the chip with Blink sketch and all looks good, I get the flashing LED.
My next test is to see if I can output some serial text back to my laptop via the Arduino Serial Monitor so I can debug the stuff I develop.
I have downloaded and installed the attiny library and I am using the TinyDebugSerial to output a simple string in a loop every 1 second.
I have burned the bootloader to 8MHz and upload the simple sketch. When I connect the pin 2 - PB0 to pin 0 (rx) of the UNO, via a 220 ohms resistor, I see the TX led flicker every second, so I know the ATtiny84 is sending out my string, but the Arduino Serial Monitor show garbled data every second.

Anyone have any ideas?

Thanks
Mark

What baud rate?

9600 baud

I have bad news and I have good news.

First the bad news. I just can't get motivated to help you with what you are trying to do. I'm afraid you may be on your own.

Now for the good news. I have something available that works far better. If you're interested, send me a Personal Message with an email address.

(Just kidding on the bad news. If you REALLY want help with what you're attempting, just let me know.)

dear CB....
YOU GOT ME re the bad news...you are a baaaad mannnnn!....ive been researching using software serial to get an output from my T85 to the Ardy's serial monitor....but if you have good news for our brother in arms, here's my email address as well... hesynergy@gmail.com

you might try 4800 and 1200 for the serial rate in the serial monitor. If a different baud rate works it will give some info that we could use to help troubleshoot.

hesynergy:
dear CB.... YOU GOT ME re the bad news...you are a baaaad mannnnn!....

]:smiley:

ive been researching using software serial to get an output from my T85 to the Ardy's serial monitor....but if you have good news for our brother in arms

What are you using for a programmer?

What is the target? ATtiny84?

Are you using an external clock with the ATtiny? The internal clock is not always accurate enough for serial communication, even at low baud rates.

Also, the SoftwareSerial library in Arduino 1.0 will work on the ATtiny, assuming you're running at 8 or 16 MHz (not 1 MHz). In case you want to try a different serial library.

I have connected up an ATtiny84 to an Uno using the high-low tech instructions for Arduino 1.0. I have no other wires connecting the two other than MISO MOSI, SCK, RESET, VCC and GROUND. I can upload simple code that reads a photosensor and a pushbutton and I can light LEDs and switch relays. What I can't get working is serial comms. I've tried various pins to no avail.

Do I need to add more wires? Where? I am a real beginner and would appreciate any help. Thanks in advance.

Do you need serial output (e.g. sending data to a sensor) or do you need something for debugging purposes?

I only want to send information back to my PC for debugging purposes. I am not getting anything at all on the serial monitor, just a blank window. Thanks.

Phredd:
I only want to send information back to my PC for debugging purposes.

Check your Personal Messages.

I would also like to get information onto my Serial Monitor from a Tiny

CodingBadly's tiny core has no problem providing serial output on the tiny84--at least for me at 1MHz and 8MHz using the internal clock and a 38400 baud rate. The trick is using the correct pin. On Speeds less than or equal to 8MHz use pin 2, at 16MHz use pin 13. Since it is bit banged serial, I don't think it will work at speeds other than those three.

wanderson:
CodingBadly's tiny core has no problem providing serial output on the tiny84--at least for me at 1MHz and 8MHz using the internal clock and a 38400 baud rate. The trick is using the correct pin. On Speeds less than or equal to 8MHz use pin 2, at 16MHz use pin 13. Since it is bit banged serial, I don't think it will work at speeds other than those three.

For bit banging, why would the pin used matter?

He used the same pin as used if a xtal is hooked up to the chip for slower speeds, and since faster speeds need a crystal in most of the tiny's he had to switch the pin for those speeds. If you wanted to change the core code provided in the tiny libraries you could make any pin the default serial output.

please use http://arduino.cc/forum/index.php/topic,85238.0.html

thank to Two-way serial communication between Raspberry Pi and a TinySensor – Martin's corner on the web

and republish it