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"
( 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 Another try at an Arduino Based Morse Beacon | brainwagon 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?
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...
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.
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...
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.
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.
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...
Changing the jumper and connecting ground (2 separate tasks for chip safety... just in case!) allows either uC to be burned. It is quick, easy, the sacrifice of a real Arduino UNO, but well worth the $22 price.
ON economics, in 25 Qty, the t85's are under a $1, varies from about $0.85 to $0.99 from Newark. The same 25 qty of 328P-PU will run about $1.99 so the dollar economics are 2::1 in favor of the smaller chip. However, I have (except for size and power requirements) simply settled on the 328P because of the additional RAM and flash space. This along makes it easy to create your own library set to link against and be not-too-concerned about flash or RAM issues.
Also, I have 2 MiniPro's hung off of very short USB cables that I use for programming. Code that runs in the Arduino Mini environment is nearly guaranteed to run on a naked 328P. Standardizing on the larger chip is a $1 silicon penalty that is most often the better approach (excepting small size and flea-power requirements.)