2
\$\begingroup\$

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.

\$\endgroup\$
2
  • 1
    \$\begingroup\$ 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. \$\endgroup\$
    – Russell McMahon
    Commented Nov 21, 2011 at 13:50
  • \$\begingroup\$ (1) This question had devolved into a collection of recommendations about which hardware to buy. Off-topic. (2) It's attracting spam. \$\endgroup\$ Commented Sep 23, 2015 at 20:42

8 Answers 8

5
\$\begingroup\$

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.

\$\endgroup\$
1
  • \$\begingroup\$ 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. \$\endgroup\$
    – drxzcl
    Commented Nov 21, 2011 at 23:06
2
\$\begingroup\$

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.

\$\endgroup\$
2
  • \$\begingroup\$ 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). \$\endgroup\$
    – capcom
    Commented Jan 19, 2013 at 3:36
  • \$\begingroup\$ @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. \$\endgroup\$ Commented Jan 19, 2013 at 5:13
0
\$\begingroup\$

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.

\$\endgroup\$
11
  • \$\begingroup\$ Only reason for AVR choice was that I liked the AVR Studio IDE. Is there a similar (free) PIC equivalent? \$\endgroup\$
    – Ben
    Commented Nov 21, 2011 at 14:32
  • \$\begingroup\$ 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. \$\endgroup\$ Commented Nov 21, 2011 at 15:14
  • \$\begingroup\$ 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... \$\endgroup\$
    – Johan
    Commented Nov 21, 2011 at 15:23
  • 1
    \$\begingroup\$ 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. \$\endgroup\$
    – rfusca
    Commented Nov 21, 2011 at 15:24
  • \$\begingroup\$ @rfusca: Are the TI tools finally free now? Last time I looked they were fragmented and significantly expensive. \$\endgroup\$ Commented Nov 21, 2011 at 16:12
0
\$\begingroup\$

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.

\$\endgroup\$
1
  • 2
    \$\begingroup\$ The Dragon is much cheaper than the JTAGICE, and is just as good in most situations. \$\endgroup\$ Commented Nov 21, 2011 at 17:45
0
\$\begingroup\$

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.

\$\endgroup\$
1
  • \$\begingroup\$ Can we program an arduino to act as a JTAG programmer? \$\endgroup\$
    – 0xakhil
    Commented Nov 22, 2011 at 15:14
0
\$\begingroup\$

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?

Website: http://matrixstorm.com/avr/tinyusbboard/

Have fun!

\$\endgroup\$
0
\$\begingroup\$

You may use Parallel port for programming your mcu. Here's the link http://blog.jeffmurry.com/2008/09/26/simple-parallel-programmer-for-attiny2313.aspx

\$\endgroup\$
1
  • \$\begingroup\$ Apart from a tutorial, have you got any reason because this solution would be suitable? \$\endgroup\$
    – clabacchio
    Commented Feb 22, 2013 at 15:16
0
\$\begingroup\$

I've combined two projects: The Srhimp and Arduino On Breadboard and made up Shrimpuino. Overall cost for The Shrimp is about $3 and you may just use that one. If you want to expand it to full Arduino Uno clone, add the rest of the parts from Arduino on breadboard. If you need detailed instructions how to build it, just contact me.

\$\endgroup\$

Not the answer you're looking for? Browse other questions tagged or ask your own question.