L'Hexapod: Books for programming an AVR micro

Previously published

This article was previously published on lhexapod.com as part of my journey of discovery into robotics and embedded assembly programming. A full index of these articles can be found here.

So far I’ve bought three AVR programming books. AVR: An Introductory Course, Programming and Customizing the AVR Microcontroller and Atmel AVR Microcontroller Primer: Programming and Interfacing (Synthesis Lectures on Digital Circuits and Systems).

They are three quite different books and each has a distinct focus.

I read AVR: An Introductory Course first. It’s a slim volume that teaches you how to program the AVR family of micros with assembly language. It’s a good book and the focus is very much on learning how to program the various facilities available and how to use the various programming constructs to get work done. It has an interesting style whereby the author will explain some machine instructions in the course of solving a programming problem and he’ll then ask you to provide the next ‘x’ lines of the program under construction. There are answers at the end of the book. I haven’t yet worked through the book in ‘answering the questions’ mode, but I expect it has a very good effect on how you learn the assembly language under discussion. The book starts with the simpler microcontrollers and later shows you how to simplify the earlier code that you wrote by using the more advanced facilities available with the more advanced processors. It’s a good book and it’s a real hands on introduction to the subject. I read Atmel AVR Microcontroller Primer: Programming and Interfacing (Synthesis Lectures on Digital Circuits and Systems) next and found it a disappointment. Again it does what it says on the cover, but compared to the other two books it’s too simplistic and ‘hand wavey’ to be a great deal of use. It also seems to be a bit of a cut’n’paste job from a more general ‘microprocessor’ text book. All in all I could have done without this one.

Programming and Customizing the AVR Microcontroller (Programming and Customizing Microcontrollers) is another good one. The initial sections explain the facilities available and the later sections contain code to help you interface the AVR family with various other devices. After that there are a series of projects with schematics, design rationale and code. The book comes with a CD which contains data sheets and a host of information that you could download, some programming tools and code from the book.