Selecting a Micro
There are two family of microcontroller that are extremely popular among hobbyist. The “PIC” series from Microchip and “AVR” series from Atmel. Both these chips are wonder of modern microelectronics. PIC had ruled for a long time but now AVR is also getting in serious competition.>>Speed and ease of use.
I prefer AVRs because one major reason. They are fast. When a PIC and an AVR is running with same frequency lets say 12 MHz, then the AVR is actually executing four times faster than the PIC ! Yes 4 times faster. This is because the PIC requires 4 cycle to perform a single execute cycle while the AVR execute most of the instruction in 1 clock cycle. In addition, I like the AVR architecture because of its consistency. It makes using the most advanced feature of AVR very easy to use. These chips are easily available and they are cheap.>>Free “C” compiler.
One more important thing, generally microcontroller programs are written in assembly language for efficiency. Which you may know is a very low level and unstructured language. Therefore, to achieve a small thing lots of code need to be written and the programmer cannot concentrate on program logic. This makes the things harder. However, mid to high end AVR mcus are powerful enough to support high level language such as C efficiently. To write programs in ‘c’ for AVR or any other microcontroller we need a c compiler for that MCU. Generally these compilers are priced so high that they are out of reach of hobbyist and small company. But fortunately for AVR mcus there is a very high quality ‘c’ compiler for free. It is GNU C compiler. It is extremely popular and it has a large user base. It is part of the free and open source software revolution that we are witnessing (like Linux, PHP, Apache, OpenOffice.org etc). Providing excellent software at no cost. They are the dedicated work of programmers around the globe.Different AVRs
Now we have selected AVR as our choice of micro lets see what different AVRs are available. The popular micros of AVR family are- AT TINY2313 [20 PIN, 2K Flash ,128 Byte RAM, 128 Bytes EEPROM]
- AT MEGA8 [28 PIN , 8K Flash , 1KB Ram, 512 Byte EEPROM]
- AT MEGA16 [ 40 PIN, 16K Flash, 1KB Ram, 512 Byte EEPROM]
- AT MEGA32 [ 40 PIN, 32K Flash, 2KB Ram, 1KB EEPROM]
- Timers with PWM.
- Serial Communication
- USART for connection with PC and other micros
- SPI can be used for connection with other chips like DataFlash, Graphical LCD, MemoryCards.
- TWI
- Analogue to Digital Converter.
|
|
|
MCU based development process. |
- A PC running Win98 or Better.
- An In-System programmer (ISP): This is the device which connects your mcu to your PC .You can easily make a serial or parallel port programmer. You can also make a USB programmer (little complicated) or buy one (see our shop !).
- A Target Board: It is nothing but you project which has an ISP header so that programmer can be connected and detached easily. In most simple case, it has a MCU with its power supply, a few basic connections, and ISP header.
- Last but not the least an AVR MCU.
- A C compiler (free)This will compile your program which is written in a high-level language to machine language. After successful compilation and build you will get a file with .hex which you have to burn into the MCU’s flash
- A programmer software free (free)This software will help you burn the above mentioned hex file to mcu flash.That is all for now.
Download PDF version| Get Adobe Reader Free !!!
| Whats Next |
| In next tutorial, I will tell you how to make a simple programmer, basic AVR board, write and compile your first program, and then burn it to MCU to watch it gooooo… |




Seems You will describe the AVR in a great ease.
I appreciate all of your tutorials about AVR and glad to see them all. I would like to see more information about using the I2C pins and programming them
thanks
Robert – NI5N
I thanks to team of extreme electronics for this highly professional data.
@Harish Upadhyay
We thank you too!
The Team
eXtreme Electronics