Tim's AVR Page

Recently at work, I selected the Atmel AVR microcontroller for a project I was working on.  It had several attributes that made it a good match for this particular device we were designing:

Then I went looking for development tools.  I wanted to use a high level language because we had a fairly short deadline and I needed to get several other things done as well.  It appears that the only professional quality C compiler is the IAR compiler.  At $2400 it is a lot more expensive then the next most expensive competitor, but again, I needed to get this done quickly so the price of the compiler wasn't a big deal.

The $49 STK200 is a great bargain.  At $200 the ICE200 is an even bigger bargain.  Every processor should have quality, inexpensive tools like this available.  Atmel also has a simulator and macro assembler available for free. They both work well.  If only they had a high quality $99 C compiler available too, there really wouldn't be anything else needed.

I ordered the compiler, the development board and the ice.  Unfortunately when they came in, I was in the middle of directing a large week long project to get all of our hardware documents under version control software (we use Perforce which is pretty nice.  It's also free to set up at home if you have the right OS to use as a server.)  I had these three boxes sitting on my table for two and a half days while I worked on this other thing.  It was really painful.  I wanted to open them up and play with them.  It was like waiting for Christmas morning when I was a child.

Finally the weekend came.  My wife and daughter were off on a Girls Scout campout, so it was just Stephen and me here at the house.  He was excited about playing with it too.  I installed Atmel's AVR studio, the IAR compiler (which is dongle protected), and found a couple wall warts to power the development board and ICE.  I wrote a little up-counter program to use the eight LEDs on the STK200.  It compiled fine, I started the AVR Studio and loaded the program.  I ran the program (the equivalent of "Hello world!") it actually toggled the LEDs.  Of course it was a down-counter rather than an up counter because the LEDs light on a zero rather than a one, adding a one's compliment to the output.  I was excited.  I don't think I've ever had a new embedded platform come up so easily.

I spent the rest of Friday evening writing lots of little test applications to try out different peripherals and amuse Stephen.  Saturday was more of the same, but we got tired of the LEDs and push buttons.  We needed more exciting I/O.  The only electronics supply store that I know of here in Hilliard is Radio Shack.  We went there late Saturday afternoon.  When I was a kid, I used to go to Radio Shack.  I've heard the expression, "like a kid in a candy shop."  Candy never held the appeal for me that Radio Shack did.  It was like going to the movies.  I could have stared at those walls of components, and day-dreamed about the wonderful things I could do with them, all day.

Unfortunately, I guess not everyone felt the same way, or at least Tandy didn't think they did.  The few displays of parts at Radio Shack today are almost an embarassement.  Even their catalog, which the clerk assured me contained everything Radio Shack carries, had almost nothing in the way of whizbang gadgets to hook up to a micro.  Of course the clerk could be wrong.  After all, a customer asked him what value of current limiting resistor he should use with an LED, and the clerk had no idea.  After I told the customer what value he needed and helped him pick the right one from the rack, the clerk assured us that he used to know how to do that and he had a book somewhere that would tell him how.  I told him all he needed to know was Ohms Law.  He gave me a blank stare.

Anyway, we ended up with a couple things, but the only real addition to the AVR experiments that I made was a piezoelectric element.  I wrote a bunch of different sound effects and used the pushbuttons to play them.  For $10 I could build a 50¢ plastic toy!

I was so impressed with the setup that I asked for the same thing (minus the compiler) for my birthday.  I've ordered them from All American, and I hope they will be here soon!  I expect I'll buy a less expensive compiler, I've tried a few out there and they don't produce very good code, and rely on assembly language for the parts that need to be fast, or small.  I haven't tried AVRGCC yet. I've read good things about it, but it doesn't work fully with AVR studio.

I'll try to improve this page and and add to it as I learn more and gain more experience with the tools.

Here is a page of project ideas I have. I'll add to this and update it if I actually carry through impliment anything ;^)

Tim Kemp
6/6/2000