Best and Steps AVR Programming

This is a complete AVR Tutorial, including avr programming in a very basic & organized way, We will go through by following items.
  • What is an AVR?
  • Using Mac and Windows
  • How AVR programming works
  • Choosing a programmer, to burn the code.
  • Using AVRDUDE

What is a micro-controller?

The best way to explain what a microcontroller is, is to start with your computer. Your desktop computer (or laptop) is comprised of multiple parts, a CPU (such as a Pentium or Celeron), some RAM, a hard disk, a keyboard and mouse and a monitor screen. Programs are stored on the hard disk and run on the CPU, with temporary data stored in RAM. You can run multiple programs at a time by having one ‘master program’ called an operating system (such as Linux, Windows or Mac OS X) and that master program keeps track of things for you.

AVR Programming Chip


AVR Programming

The AVR chip has components, too. It has a CPU, some flash storage, some RAM and some EEPROM, all in one little chip!. The CPU is just like the one in a computer, but its much simpler and not nearly as fast (what do you expect for $2.50?) The flash storage is just like the flash storage in your mp3 player or digital camera card, except its used to store programs. Its kinda like the hard disk of the microcontroller, except you can only read from it. The RAM is just like computer RAM. The EEPROM is kinda like flash except you cant run a program from it, but its used as long term storage. The EEPROM doesnt get erased when the chip loses power.

So, to recap: The AVR chip runs whatever program is stored in the flash, uses the RAM for temporary storage and the EEPROM for longer term storage.

Most computers have a 32-bit CPU running at 1GHz, with 1GB of RAM and 100 GB of storage. The kinds of micro-controllers discussed here run at 10MHz, have 1KB of RAM and 10KB of storage. (On the order of) However, their small size, lower power consumption and low cost make them an excellent choice for many projects!