Picture of Attiny serial monitor using arduino walkthrough
Allllllllllright dudes and dudets. Here is whats up, we're going to make attiny and arduino bestest of friends.

If you have ever worked with capacitive switches you know how much it makes you want to smash your face into a wall...Now imagine you have no way to monitor output, well that is what I was running into. Problem is you can never know what the output is with stock settings of an attiny. So my solution comes from the good boys/gals of MIT. However, It's not super clear on their walkthroughs so I thought I would provide a more in depth explanation.

Step 1: W-w-w-wire it up

Picture of w-w-w-wire it up
Lets set up a little basic “hello world” type example. Wire your arduino like the following:

1. Make sure you connect a 220Ω resistor between pin 2 and Tx(transmit) input of arduino. Resistors aren't directional so it doesn't matter which way you insert it.

2. Now put a 10uF capacitor between ground and reset with negative going to ground and positive to reset

If you do not do this, you could damage your board/attiny or make the universe implode. (refer to pictures above). SO SERIOUSLY, IF YOU MAKE THE UNIVERSE IMPLODE I WILL FIND YOU IN A PARALLEL DIMENSION AND PUSH YOU IN TO A DEEP PUDDLE OF WATER, AND YOU WILL HAVE TO WALK HOME WITH WET SOCKS.
N.fletch2 years ago
I'm in a quiet office and the wet socks bit made me burst out laughing...
hilukasz (author)  N.fletch2 years ago
OscarL1 hilukasz6 months ago

Hello everyone

I followed the tutorial to the letter and I can not communicate for the serial. The sckech of the Blink if it works. I've seen on other forums that have the same problem but I can not find a solution.

Please could you help me, I have long been trying to communicate the attiny by serial but am not able to.

Thank you

robot7978 months ago


can the attiny be used as a serial debugger

i have a project in mind that needs that

so it goes arduino to attiny with lcd on shift register

sühab11 months ago

Burning the bootloader has saved my life! Thans so much, you're great!

renelm1 year ago

While your style of writing captures the audience and let us slip out a not-so-silent snicker, you elegantly skip the steps on how to actually program the Attiny.. even in the step where you talk about burning the bootloader on the 'tiny, the correct wiring isn't mentioned (I am assuming you are using ArduinoISP..?)

hilukasz (author)  renelm1 year ago

not sure what your question is. please read the entire tutorial. the first page shows the wiring.

I did and It's hard to program the Attiny or burn a bootloader through the TX-pin.. Nice drawing otherwise, but that's all good and fine for listening to what the Attiny is telling us..

electro182 years ago
In the diagram it shows 2nd pin but in the description it says 3rd pin , does it matter if pin 3 or pin 2 is connected?
hilukasz (author)  electro181 year ago
sorry this is a bit confusing. I should clarify this its analog input pin 3, but pin 2 on the diagram. so basically follow the picture :)
Thanks ! :D
hilukasz (author)  electro181 year ago
side note: I have fixed this in the post to avoid confusion.
tigerbomb82 years ago
On the UNO there should be a 10 uF cap between reset and and ground.
I don't know what was before in the instructable, but I always use a 120 ohm resistor between reset and 5v for my duemilanove. Works great.
Source: http://playground.arduino.cc/Main/DisablingAutoResetOnSerialConnection
hilukasz (author)  Veda881 year ago
hmm, interesting. I've seen it done all sorts of ways. Some people just use a jumper even.
hilukasz (author)  tigerbomb82 years ago
ah, you're totally right. I was using a few sources for this. But MIT one also says 10 uF, so I will go with that. thanks for the catch.
vawi20031 year ago
I'm getting following errors:
tiny_debug.ino: In function ‘void setup()’:
tiny_debug.ino:2:2: error: ‘Serial’ was not declared in this scope
tiny_debug.ino: In function ‘void loop()’:
tiny_debug.ino:7:2: error: ‘Serial’ was not declared in this scope
tiny_debug.ino:8:10: error: ‘delay’ was not declared in this scop
hilukasz (author)  vawi20031 year ago
link me to a gist of your code please. can't do much without knowing what you have.
manu082 years ago
Hi, nice tut btw. Still I have some questions. Why are you setting attiny like that as oppose to http://hlt.media.mit.edu/wp-content/uploads/2011/06/Screen-shot-2011-06-06-at-1.46.39-PM.png. Do you send your sketches just by one wire?
hilukasz (author)  manu082 years ago
Manu, this is for reading/sending serial via MISO and MOSI pins, not programming. What that diagram shows is how to program the attiny45/85, they are two very different things. As far as I know you cannot program via TX/RX pins
thanks man!
Dantex2 years ago
I have arduino mega2650 wich doesn't support working as ISP programmer

bu i have bought USBtinyISP wich is suported in arduino IDE

but I dont know how to programm attiny85v via USBtinyISP!
some help?
hilukasz (author)  Dantex2 years ago
that's not true at all. mega2650 should support ISP mode, just have to make sure you have reset jumper in since the IC is not removable.