Pages: [1] 2   Go Down
Author Topic: ATtiny..... Is it really that simple?  (Read 1245 times)
0 Members and 1 Guest are viewing this topic.
Denmark
Offline Offline
Full Member
***
Karma: 8
Posts: 196
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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  smiley-draw

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?

Logged

Bob Pease: "My favorite programming language is ... solder."

Offline Offline
Edison Member
*
Karma: 56
Posts: 2181
Now, More Than Ever
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Yes, that's it.
Logged

"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?"

Global Moderator
Dallas
Offline Offline
Shannon Member
*****
Karma: 176
Posts: 12285
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Brisbane, Australia
Offline Offline
Edison Member
*
Karma: 29
Posts: 1069
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

"There is no problem so bad you can't make it worse"
- retired astronaut Chris Hadfield

Denmark
Offline Offline
Full Member
***
Karma: 8
Posts: 196
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


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?
Logged

Bob Pease: "My favorite programming language is ... solder."

Global Moderator
Dallas
Offline Offline
Shannon Member
*****
Karma: 176
Posts: 12285
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Global Moderator
Dallas
Offline Offline
Shannon Member
*****
Karma: 176
Posts: 12285
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Denmark
Offline Offline
Full Member
***
Karma: 8
Posts: 196
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks again.

 smiley
Logged

Bob Pease: "My favorite programming language is ... solder."

South Texas
Offline Offline
Edison Member
*
Karma: 8
Posts: 1023
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Valencia, Spain
Offline Offline
Faraday Member
**
Karma: 118
Posts: 4537
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

No, I don't answer questions sent in private messages...

Denmark
Offline Offline
Full Member
***
Karma: 8
Posts: 196
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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!
Logged

Bob Pease: "My favorite programming language is ... solder."

Anaheim CA.
Offline Offline
Faraday Member
**
Karma: 44
Posts: 2805
...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

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

Denmark
Offline Offline
Full Member
***
Karma: 8
Posts: 196
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


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.


* En bette en.JPG (64.07 KB, 498x480 - viewed 11 times.)
Logged

Bob Pease: "My favorite programming language is ... solder."

Valencia, Spain
Offline Offline
Faraday Member
**
Karma: 118
Posts: 4537
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


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

No, I don't answer questions sent in private messages...

Wahiawa, Hawaii
Offline Offline
God Member
*****
Karma: 27
Posts: 582
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I bought a bunch of these tiny breakout boards and they work great.

https://tindie.com/shops/bot_thoughts/eezee-tiny-breakout-programming-board-kit/
https://tindie.com/shops/bot_thoughts/eezee-attiny244484-breakout/
https://tindie.com/shops/bot_thoughts/eezee-attiny2313-target-board/


Logged

Pages: [1] 2   Go Up
Jump to: