I’ve been using PIC’s for quite a while now. I like the PIC platform, but decided to switch it up and try out the AVR microcontroller platform from Atmel. Its pretty popular, and you can’t go a day on hackaday.com without hearing about something cool being done with AVRs.
However, as with most hardware ecosystems, there are some terminology which took me awhile to figure out what means what. This is always obscured by people trying to appear 1337 to others. Here are the straight answers you’ll need to buy the hardware you need!
Arduino vs AVR:
It took me a bit of research to get a straight answer about this one. An Arduino is a nicely-packaged AVR originally designed for rapid prototype use. The Arduino platform also has the advantage that it supports “Shields”. An Arduino Shield is just a board that you plug in on top of the AVR mainboard that adds various advanced capabilities to your platform. There are sheilds that can add GPS, Internet connectivity, temperature sensors radiation sensors, among many other things. Any sensors that you can think of (really), someone somewhere has come up with an AVR shield that you can slap on top of your AVR mainboard to add that capability. The big advantage here is that you don’t have to worry about actually hooking up any wires yourself. Disadvantages are the price, that this leads to a clunky form-factor, and that it abstracts you from neat things you can do with just using the plain sensor on top. I’m a computer engineer, and I decided that the advantages of just using the AVR by itself outweighed the conveniences of the Arduino platform. By using an AVR alone, you can create cheaper, more elegant, and more power conservative devices than with an Arduino. I’d rather have these advantages, so I went with the AVR by itself.
Obviously, you need to be able to program the AVR. This was the most annoying part in figuring out how to move from using only PIC’s to using AVRs. There are probably a million different ways to program and modify AVR’s. It can get confusing! You can hook up the AVR to your serial port. You can pick a programmer prebuilt. There are kits you can assemble that will program your AVR. You can use an Arduino as an AVR programmer. If you decide which one of those you want, do you want JTAG? Do you want High Voltage programming? Its like thirstily standing in front of the slurpee machines and not knowing which of the 24 flavors you want the most. If you were like me and just wanted something moderately-priced and full-featured that works with Linux buy the AVR Dragon for $50. Its a good kit to start out with. You’ll also need a USB B cable (printer usb cable) as well as a 6-10 pin ISP cable used to program the AVR on the breadboard. You can play with all the other programming modes once you get your feet wet with the basics!
This was important to me. I haven’t had Windows installed on any of my machines in something like 5 years, and I’m not gonna go back to that mess just to program my AVR. 🙂 Like I mentioned above, the AVR Dragon is good hardware to work with Linux. The best software for this is avrdude.
So there’s my combo for working with this brand of microcontroller on Ubuntu. An AVR, programmed by the AVR Dragon, which uses the avrdude software.
I have a tutorial on how to set up your AVR Dragon for use with an ATtiny13, and a blinky-light AVR tutorial to follow! Maybe I’ll mix it up and show you how to control a servo…