# Cheapest / easiest way to get started with AVR programming

What's the cheapest / easiest way to get started with AVR programming? I have downloaded a copy of AVR Studio 5, and like the IDE as it is based on Visual Studio, which I'm familiar with.

How do I get from here, to having a working project on something like an AVR Tiny chip?

I don't want to do anything fancy - first project is to do a kind of timer chip that lights some LEDs and then uses a solenoid to ring a bell. As such I don't think I need all the "fancy stuff" like touchscreens / LCD displays etc. Also, i don't know how I'm going to get on, so don't want to invest too much in case I don't get on with it.

-
That may or may not be deemed a proper question for this forum by some. If it passes muster you'll get some good answers, but I suggest you also look at PICLIST where you can ask less structured "give me advice" type questions when you want to. This forum and that one complement each other well when learning. –  Russell McMahon Nov 21 '11 at 13:50

My advice: Get a USBTinyISP programmer. It's a $20 upfront investment, but it's well worth it. (both types of programming cables included and will work with any modern computer). Also, while you're at it get a ZIF Socket for ease of programming. Now all you need is a breadboard, wire, some of the basics(resistors, capacitors, AA batteries), an ATTiny, and you're good to go. - I've just done this. It's a good way to start, for example by following Sparkfun's "beginning embedded electronics" tutorials (sparkfun.com/tutorials/57). They will walk you through the tricky bits like setting the fuses. Oh, and that ZIF socket is a good investment. If you stick your attiny in a breadboard or socket a few times, pins will bend. – drxzcl Nov 21 '11 at 23:06 add comment My suggestion would be to get an arduino or clone - not so much to use the arduino IDE and libraries (though you will have that as an option and they are sometimes useful, especially the ISP sketch), but because you get a widely known, minimal cabling atmega platform which you can use both to test programs on and as a simple ISP programmer for loading programs into other atmega and attiny chips. At first glance these boards seem overpriced at$20-30, and you can get a bare atmega chip with serial bootloader preprogrammed inexpensively, but what usually kills the economics of a first build-it-yourself is the USB-serial converter. That is usually a surface mount part in the form of its own $15-20 kit or molded in cable. As a result, building up from parts tends to be cost effective only once you already have a logic level serial solution (or some other program loading mechanism) which you can share between a lot of boards that don't have such built in. - I don't get it, why not use a Serial-USB converter for communication (~$2), and something like the USBasp for programming (~$3)? Unless you must spend on a breakout board, or know extremely little about electronics, an Arduino is good waste of money. I think your answer is certainly valid if Ben is a complete beginner (though he doesn't seem like one). – capcom Jan 19 at 3:36 @capcom -the cheap USB serial converters tend to be RS232 level, not logic level. And most of the cheap ones aren't as cheap as they first seem after you get them shipped, especially if your time waiting for them is worth anything. The point of my message was that you can collect the parts more cheaply - or you can pay a premium (but still a relatively small amount of money) to have something that already works. I've built lots of boards from scratch, but its not necessarily worth my time to do so unless I need something unique. – Chris Stratton Jan 19 at 5:13 add comment You haven't provided any reason it needs to be for AVR. Getting into micros can easily done in the PIC world too. In that case, the lowest cost entry is a PICKit 2 and something like a PIC 18F2620. - Only reason for AVR choice was that I liked the AVR Studio IDE. Is there a similar (free) PIC equivalent? – Ben Nov 21 '11 at 14:32 Microchip MPLAB, I prefer it to AVR Studio. AVR Freaks is a very useful forum, if you decide to stick with AVR: avrfreaks.net. The PIC equivalent is: microchip.com/forums/default.aspx. – Leon Heller Nov 21 '11 at 15:14 When you look around you will find that there is a lot of different mcu maker specific IDE:s that only works for one kind of mcu. They like to use their IDE to get some vendor lock-in. Once you learned how MPLAB you will be reluctant to find out how AVR Studio works, so you will stay with the pic:s... – Johan Nov 21 '11 at 15:23 There's also the super low cost to entry to the TI MSP430's micros with the TI Launchpad, just throwing it out there as another low cost option. – rfusca Nov 21 '11 at 15:24 @rfusca: Are the TI tools finally free now? Last time I looked they were fragmented and significantly expensive. – Olin Lathrop Nov 21 '11 at 16:12 show 6 more comments You need a AVR JTAGICE mkII and a dev board to play with. The jtag will give you breakpoints so you can debug your code from the IDE. Any Arduino card will do as long as they have a jtag connector. - The Dragon is much cheaper than the JTAGICE, and is just as good in most situations. – Leon Heller Nov 21 '11 at 17:45 add comment The cheapest and perhaps easiest way to get into AVR programming is to get a computer with serial port, make your own programmer and start experimenting with it. There are countless serial and parallel port based programmer schematics on the Internet and some are very cheap to make. I myself use this one and it works fine for me. Do note that they may work slowly if you're using a USB->serial converter. While the AVR JTAG ICE mkii is a great way to start programming, the unit itself has cost which is in the hundreds of dollars range and you may want to skip that expense is you're not sure that you want to commit yourself to working with AVR. On the other hand a simple RS-232 based programmer will cost in parts less than$5 and is therefore a better chioce for someone who doesn't want to invest too much. On the other hand, the simple programmers (including official Atmel made ones) don't have support for IDE debugging so you may have to move to older techniques such as flashing an LED after each function in the program, writing debug output to serial terminal or to a screen and similar.

Also on the Microchip side, it's worth noting that PICkit can be used for debugging too.

-
Can we program an arduino to act as a JTAG programmer? –  0xakhil Nov 22 '11 at 15:14

Maybe you want to check out tinyUSBboard. It may not be the prettiest board, but it has an onboard USB-Interface and does not need any serial programmer. (Not even for updateing.) Maybe is the cheapest and easiest arduino compatible board of its class, too?

Have fun!

-