Thursday, October 14, 2010

Short and sweet introduction to microcontrollers, specifically ATMEGA series from ATMEL

If you know even a little bit about Microprocessors, you must be aware of what it can do and what we can program it to do. But a Microprocessor, by itself is nothing, it needs memory, peripheral interfaces, timers, counters, storage etc to operate. This whole setup is known as Microcomputer.

Now, for certain applications, we need programmable control but we can't setup a microcomputer for a single application, so, a miniaturized Microcomputer integrated onto a single chip IC was developed that is used in such dedicated systems and it is popularly known as Micro-controller(uC in short) and these systems are known as Embedded Systems.

These uC have inbuilt I/O Ports, Timers, Counters, Analog-to-Digital Converters, UART (Asynchronous Serial Data interface ), SPI Line, Flash memory, RAM, etc. All these parts of the uC can be accessed or used in our system by programming the control words onto the Dedicated Registers inbuilt in the uC.

There are a lot of companies manufacturing micro-controllers these days. The most popular of them among hobbyists being from ATMEL Corp., these are

1. 89C51/52 etc - Having 8051 core

They have limited ports, limited flash memory to store our program, limited RAM to run it and limited peripherals to perform advanced tasks.

2. ATMEGA16/32/128 etc. - Having AVR core.

They have adequate RAM, Flash, peripherals, I/P ports to perform almost all intermediately advanced tasks.

With appropriate Integrated Development Environment (IDE), we can program uC as per our requirement in any programming language we wish to. The thing is that we must have a supporting compiler, linker and flashing utility for our uC. The most popular and supported language are

1. Assembly Language - Being a low level language, is slightly tough to learn but is more powerful as we work at bit n byte level.

2. 'C' language - A high level language with better constructs and easy to learn, it has now almost replaced Assembly language except in certain exceptional cases. C language is more supported by various IDEs namely, WinAVR, AVR Studio, Eclipse etc.

This is all for now, we'll be taking each uC one by one and do the case study with practical examples in following posts.

Short and sweet introduction to microcontrollers, specifically ATMEGA series from ATMEL