Go Down

Topic: ATtiny..... Is it really that simple? (Read 1 time) previous topic - next topic

Peter_I

I got hold of some ATtiny85s without knowing what to use them for. I just liked the possibility.

I consider myself an electronics noob, but a careful one, and I must say that I don't like the more enthusiastic approach of my engineering friend. He calls it "Learning by Burning".
I prefer to study, then ask those who could be considered knowledgeable...... and then burn something.

Back to what happened:

I downloaded the Attiny library, unzipped it and installed it as directed.
I did likewise with the latest Arduino IDE
Hooked up the breadboard with the ATtiny according to http://hlt.media.mit.edu/?p=1695
Hooked up the indicator LEDs according to the Arduino ISP sketch
Loaded the Arduino ISP sketch to the Arduino (An UNO Rev 3)
Mounted the "do not reset" capacitor
Set ATtiny at 8MHz with "burn bootloader"
:smiley-red: forgot to select "Programmer: Arduino as ISP"....... that took some time to figure out!)
selected: Arduino as ISP
Uploaded a slightly adjusted "blink"

AND IT WORKED  :%

Now I've loaded a reduced version of the morse beacon from http://brainwagon.org/2009/11/14/another-try-at-an-arduino-based-morse-beacon/ and it sits on my desk looking happy.
I'd like to make a bike light blinking messages, and this leads me to the question:

Is it really that simple?
Is all I have to do, to connect my LED and a resistor to the chosen output pin and ground, and my 4,5 V battery between "+" and ground?

It is too simple, there must be a catch!
What have I forgotten, that will let out the magic smoke?

"Nothing is foolproof to a sufficiently talented fool"

Runaway Pancake

"Hello, I must be going..."
"You gotta fight -- for your right -- to party!"
Don't react - Read.
"Who is like unto the beast? who is able to make war with him?"

Coding Badly

What have I forgotten, that will let out the magic smoke?


It's a good idea to include series resistors on the SPI lines (the wires connected to pins 11, 12, and 13 on your Arduino) while programming.


Not smoke related but still a good idea... On the target (the ATtiny)...

• 10K resistor connected from RESET to VCC

• 0.1uF capacitor connected from VCC to GND as close as possible to the pins on the target

strykeroz

Yes. Just as easy as that.  I find in standalone projects I use far more than ATMega uC's. With the bonus they are lighter, smaller, cheaper as well as simpler...
"There is no problem so bad you can't make it worse"
- retired astronaut Chris Hadfield

Peter_I


Thanks to all of you.



It's a good idea to include series resistors on the SPI lines (the wires connected to pins 11, 12, and 13 on your Arduino) while programming.



OK.
How large? I would grab 330 or 1k, something like that?


Quote

Not smoke related but still a good idea... On the target (the ATtiny)...

• 10K resistor connected from RESET to VCC

• 0.1uF capacitor connected from VCC to GND as close as possible to the pins on the target



10k as pullup to make sure it is not accidentally sent low by some naughty stray electrons and resets?

The capacitor? To reduce noise?
"Nothing is foolproof to a sufficiently talented fool"

Coding Badly

How large? I would grab 330 or 1k, something like that?


Anything over 220 (which is typically what I use).  Most commercial programmers that include them seem to use 1K.

Coding Badly

10k as pullup to make sure it is not accidentally sent low by some naughty stray electrons and resets?


Yes.

Quote
The capacitor? To reduce noise?


Yes.

Peter_I

"Nothing is foolproof to a sufficiently talented fool"

kf2qd

What you might do is make yourself a shield that has a socket for the ATtiny on it, along with the other connections necesary and then all you have to do is plug the chip in and mount it on your Arduino and program away. I made a board like that has sockets for an ATtiny2313/4313 and an ATMega328 328/P. I program my 2313s with the internal clock so the board needs nothing other than a couple capacitors to run the 2313, and it has a 16MHz resonator for the 328. If I added a jumper I could also program the 8 pin chips on the same board.

fungus

This is how I develop code for Tiny84s: http://arduino.cc/forum/index.php/topic,134673.0.html

And this is for Tiny85s: http://arduino.cc/forum/index.php/topic,148155.0.html
No, I don't answer questions sent in private messages (but I do accept thank-you notes...)

Peter_I

I have made me a piece of veroboard with an IC-socket and the diagnostics LEDs.
It makes life quite a bit easier (or at least the programming).

I had considered a shield, but was out of stacking pins.



I will be on the lookout for a ZIF-socket!
"Nothing is foolproof to a sufficiently talented fool"

Docedison

Very similar topic... I just did the same with a $3.00 ATMega328 (W/B'loader from Amazon) and the blink WITH delay sketch and I was amazed at my thoughts at my 'accomplishment' and my thoughts went back to 1958, I built my first crystal radio that year.. I was 12 years old. and nearly as excited then as now...

Bob
--> WA7EMS <--
"The solution of every problem is another problem." -Johann Wolfgang von Goethe
I do answer technical questions PM'd to me with whatever is in my clipboard

Peter_I


And this is for Tiny85s: http://arduino.cc/forum/index.php/topic,148155.0.html


Nice!

I put mine on a 9X5 piece of veroboard.
(As soon as it was soldered, I realized that some things could have been made a bit smarter. I'll do that next time)
It leaves me with access to all the pins, a very reasonable size..... and a craving for new things to put tinies in!


Sorry for the unfocused picture, my good camera was out of reach.
"Nothing is foolproof to a sufficiently talented fool"

fungus



And this is for Tiny85s: http://arduino.cc/forum/index.php/topic,148155.0.html


Nice!
I put mine on a 9X5 piece of veroboard.
(As soon as it was soldered, I realized that some things could have been made a bit smarter. I'll do that next time)
It leaves me with access to all the pins, a very reasonable size..... and a craving for new things to put tinies in!


My first ones looked something like that. Then I found some boards which are exactly six holes wide...that made things a lot neater (it's just right for a Tiny85+ISP pins+another chip). Finally I got fed up of soldering ISP pin headers to veroboard and made those PCBs.
No, I don't answer questions sent in private messages (but I do accept thank-you notes...)


Go Up