Instructables

Attiny serial monitor using arduino walkthrough

Featured
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.
 
Remove these adsRemove these ads by Signing Up

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.
sühab3 months ago

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

renelm8 months 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)  renelm8 months ago

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

renelm hilukasz8 months ago

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..

electro181 year 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)  electro1811 months 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 :)
electro18 hilukasz11 months ago
Thanks ! :D
hilukasz (author)  electro1811 months ago
side note: I have fixed this in the post to avoid confusion.
tigerbomb81 year 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)  Veda8811 months ago
hmm, interesting. I've seen it done all sorts of ways. Some people just use a jumper even.
hilukasz (author)  tigerbomb81 year 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)  vawi200311 months ago
link me to a gist of your code please. can't do much without knowing what you have.
manu081 year 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)  manu081 year 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!
Dantex1 year 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)  Dantex1 year 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.
N.fletch1 year ago
I'm in a quiet office and the wet socks bit made me burst out laughing...
hilukasz (author)  N.fletch1 year ago
:)