This blog is the result of a statement made by our one-and-only Max the Magnificent that the Arduino environment makes it easy for people to get started with Atmel's eight-bit microcontroller (MCU) experimentation.
I think we have to concede this point to him, but I still have this nagging feeling that you really need to know what is happening under the hood (or "under the bonnet," in England) of the chip you are programming.
To explain what I am getting at, I will describe how I originally learned to program Atmel's eight-bit MCUs, way back before the Arduino ever existed.
I started programming Atmel's eight-bit chips using a Toshiba Libretto portable computer running the Windows 98 operating system. This computer is still working -- it boots faster than any other machine I have at the moment.
The miniscule Toshiba Libretto has parallel and serial ports at the back, which was all I needed to write and program chips in 1998. I did this task every Thursday sitting on the train going from London to Newcastle and back again. (Why I was doing this is another long and distant story.) The Arduino integrated development environment (IDE) -- with its support for programming in C and C++ -- would not be made available to the general public for another seven years. Thus, I started programming Atmel MCUs in assembly language.
You can see the Atmel Studio environment I was using in the image below. The splash screen proudly proclaims "AVR Studio 2.0." Wow, things were really advanced by this time.
I remember thinking that programming a micro was going to be easy. I assumed that my 25 years of electronic hardware knowledge, coupled with programming skills honed on Z80 and 6502 compilers -- and boosted by my coding major PC database programs in Borland Pascal -- were all I would need. Boy, had I got that part wrong.
It was six months before an epiphany happened and I began to understand how to make the micro do something. This was in no small measure due to a small spiral-bound book and an even smaller chip programmer purchased from Kanda.com.
The book was Get Going with... AVR Microcontrollers by Peter J Sharpe. This was the key that unlocked the mysteries associated with programming these chips and learning how to read, understand, and use Atmel's data sheets. I would like to thank Peter for helping me have endless hours of fun with microcontrollers, though I doubt that my wife, Mrs. Crusty, shares that view.
This book remains relevant to this day. Amazingly enough, it is still available from Kanda and other sources. However, the dinky parallel port programmer, powered by a 9V battery, is probably more of a museum piece. As I noted, the chips, mainly ATtiny2313, were programmed in assembly language with Atmel Studio.
Atmel is good at supplying small snippets of code in C or assembly language in its data sheets, and many a solution got coded into a final chip using its examples with my own embellishments and hardware. The simulator in Studio 2.0 was excellent for visualising the registers and hardware of the chip to be programmed, and it was no slouch at running a simulation on the Libretto.
To Page 2 >