Let's Make Robots!

Qns regarding ATtiny

Hi all,


I'm considering a low cost solution for my next project & i stumble across the ATtiny.

what I needed to do requires only 3 digital I/Os.


I'm new to the ATtiny & it seems that the programmer costs a bomb.relative to the chip.

Any recommendations for the programmer and the IDE?



Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

To do it the way I do, a bootloader is required on the development platform, not on the target platform. My point is that those do not have to be one and the same. Using my ATMega32u4 breakout board and TeensyDuino, I can create a hex file that will download and run on an ATTiny.

Got it, thanks.

This is something I am doing as I adjust my code for one device to work with an ATTiny...

I picked up a large breadboard and I have my AdaFruit 32u breakout mounted at one end. I am wiring a "virtual chip" right below it by bringing down the relevant pins to the imitate the DIP package for the ATTiny we plan to use. All other components will be wired to the "virtual chip". I will probably use a couple of short pin header blocks so it is easy to unplug. That way I can do the occasional "sanity check" by using an actual ATTiny in place of the virtual one, compiling my code with no USB diagnostics and programming the ATTiny with it.

My justification for this is that high speed diagnostic output has always been the easiest way for me to debug something that runs in real time. An ICE is helpful of course, but breakpoints only stop the processor and not external events. I used traces a lot when I programmed in assembly, but that is a really tedious way to debug and I am not sure how easy it is to get a trace that correlates to compiled source. Testing for and logging events of interest just works better for me. YMMV...

Here is a project that adds Arduino libraries to the ATiny series:


You would still need a programmer to load the code to the microcontroller. You can get USBtinyISP clones on eBay for around 15 bucks.


I used an Arduino as an ISP at first:


Lately I've been using a BusPirate though. The Pololu programmer is neat, but windows only. I tried the AdaFruit ISP, but it died the first time I used it.

Programming with plain AVR-GCC is tricky compared to Arduino. The way the chips work is pretty neat though, and learning to read the data sheet is worth doing for its own sake.

I recommend the OEM AVRISP mkII programmer for $34  (if that is too expensive take a look at the $20 programmer Patrick suggested from Pololu.com).  These both have USB interface, not serial, which is a plus in my opinion.

Definitely have to suggest you use AVR Studio 4 (free) which can be downloaded from Atmel's website. This is an easy to use IDE and has worked very well for me under Windows 7 x64.  Also link this with GCC (free C compiler) for the AVR.  If you want a very easy to follow tutorial on setting up the AVR studio environment with GCC and programming an ATtiny microcontroller go HERE.  I suggest getting some long pin dual row headers for breadboarding these as shown in the tutorial.

I use the AVR Dragon which includes Debug Wire, HVP & jtag.  It's a steal for what you get, but $50 is a decent chunk of change. 

If you're only doing the project for yourself (and you're only going to make a few of them), why not use a chip with a bootloader?  Then you can bypass the expense of a programmer altogether. An Arduino is $30 and includes the chip.  Additional chips are 3 or 4 bucks. 

But if you are going to make 20+ units, you'll want a programmer that has HVP (ICSP is kinda slow), and you'll save money with a smaller ATTiny.

If my project is approved, I'm definitely be looking at >20 sets.


I think I'll be using the Arduino to test out my ideas first. But I'll definitely want to learn to use these 8-pin mcu, so that I can wire up my room with min consideration for the $$.


Any recommendations for AVR programmer from Sparkfun? The 8 Pin AVR Developement Board seems restrictive. Maybe I can get it on Free Day!!!


Just wondering, is the AVR syntax exactly the same as the Arduino?