Atmel AVR Presentation, Part 5

Atmel AVR Presentation 5/17/09

Software Languages and Tools...

This will be the last article from my 05/17/09 presentation on the Atmel AVR. To conclude these articles we will now go into the realm of software. We are going to look at some of the programming languages and the tools you can use for developing your code. Let's begin...

Atmel

Atmel again you say, ha! When it comes to AVR development, everything starts with Atmel. Atmel provides a nice tool called AVR Studio. AVR Studio is the IDE (integrated development environment) you use for assembly language programming. What is nice about AVR Studio is all the features you get with it. An example would be simulation. Write your code, run the simulator, and watch the bits toggle. You can even change the I/O bits to simulate external devices connected to the AVR. One of the other great features is the IDE will link to your installation of WinAVR (if you have installed it) so that you can develope code in 'C'. When it comes right down to it, if you plan to work with AVRs', then you need to download AVR Studio.

BASIC

Where AVR Studio is a tool for coding in assembly language, BASIC is a language. There are a few options when programming in BASIC, and the options come with a nice IDE similar to AVR Studio. I am only going to talk a little bit about two choices, but just do a search and you'll turn up several options.

BASCOM from MSC Electronics is one of the most popular choices for programming AVRs' in BASIC. You get a good development environment, with the ability to download your code from within the tool. BASCOM comes in a free 4K code limited edition, and the full tool for $120 US. Download the demo and give BASCOM a try.

mikroBasic from Mikro Elektronika also has a BASIC compiler (yes compiler not interpreter) for the AVR. Again, Mikro provides a full IDE for developing your code. Mikro provides a free 2K code limited version along with a $149 US paid full version. I have not heard much about this program, so I would suggest you do some research before purchasing.

'C'

When you get to 'C', you have many more choices. You can go completely free to full professional with the price tag to match. We are going to work our way from cheap (not because of features) to expensive.

WinAVR is the defacto standard when you are talking free C compilers. WinAVR is based off of AVR-GCC, which both are based off the GNU compiler toolchain. For Windows PC users you'll be using WinAVR, while for Mac OSX or Linux it will be AVR-GCC. Don't worry, they are the same. WinAVR and the rest of the tools are just packaged into a nice Windows installer. There is tons of information out there on WinAVR. Take a look at the WinAVR web site, then hop on over to AVR Freaks for more info.

Just a quick blurb. WinAVR comes bundled with Programmer's Notepad, which is a simple IDE for programming in different languages. Check out their web site.

The other free option that I know of is Arduino. Arduino is hardware, but they also provide free software for programming the Arduino. Arduino is also the programming environment. Arduino is based off of Wiring (which itself is based off of Processing) which is a simplified C/C++ IDE. It was designed for people without prior microcontroller programming experience. Take a look at the Arduino web site for more information.

Low cost C compilers are not low cost because they lack features. For the most part the only real difference between high cost professional compilers and the low cost version is code density. The pro packages can optmize the code better. Dense code does hurt you in the debugging stage as your lines of C code don't match up to the assembly language listing.

Imagecraft makes a nice low cost C complier that compares well with the more expensive options. Imagecraft's product is ICCAVR.  The IDE is full featured including an applications building tool. The only thing is the the interface looks like it came out of the Windows 16-bit days. The interface is slated for a overhaul in the near future. They have a fully working demo for 45 days. After the 45 day demo period, the program is reduced to 4K code limit. You can also purchase a non-commercial license for $49, and full blown license for $249. Take a look at their web site, as they offer compilers for different microcontrollers.

Mikro Elektronika also provides a low cost solution for programming AVRs' in C. Again, this tool provides a full development environment. The interface looks current and seems to have many project management feature. I will say I have no experience with this compiler as of yet, but I have downloaded the full functional (but code limited) demo and intend to try it.

CodeVision is another choice in the low cost arena. This complier I do not know much about. They have light and standard versions that range from $127 to $211 US. In this case I will say use at your own risk. The IDE looks nice, but I know nothing about it's features. It looks as though it is only a little more advanced than Programmer's Notepad.

When we get into the professional packages, the pricing really jumps. Now you'll be spending several thousands of dollars to purchase and several hundred dollars in maintenance fees. Since this is way out of the range of most hobbists, I am just going to drop names. If you want to take a look, check out their web sites. The big name in AVR development is IAR.  Take a look and see what you think.

C++

It is possible to program the AVR in C++. C++ will take up more code space, but if you are careful it can be done. I am not going to do a full write up as before since most of the tools are the same. Free software again is WinAVR and Arduino. Both allow C++ programming. Arduino does have some built in functions that does make life a little easier. As for pro packages, look at IAR. I am not sure if other vendors do C++, but as I always say "just look at their web site".

Complete

We finally made it to the end. As you have seen, we had so much ground to cover. We really have only looked at the landscape. I leave it to you to explore the finer details of the forest of AVR.

Leave me some comments on my articles. The only way I can make these better is with feedback from you, the reader. Thanks, and I hope you enjoyed the ride.

 

Tags: