A look at ATMega16 microcontrollerJanuary 22, 2010 at 10:27 am | Posted in Microcontrollers | Leave a comment
Tags: ATMega16, Microcontroller
In this blog post we’ll take a look at Atmel’s ATMega16 Microcontroller. I have chosen ATMega16 because the knowledge we get by studying and using ATMega16 can be applied to any other microcontroller device manufactured by Atmel. Also the learning curve for becoming familiar with ATMega16 is quite gentle.
Architecture of ATMega16 is register based i.e. the registers which are collocated with CPU are used to store both the operands. In other words before an operation is performed, all the data required for the operation is loaded in the CPU. After the operation is perfomed, the result is also stored in the register. Because the CPU interacts with the registers, data access is faster than the slower memory access.
The instruction set of ATMega16 consists of just few instructions (131 to be precise) which are required for basic operations. More complex instructions for the microcontroller are built from the these basic operations. This result in good efficient working of the micro controller. This type of microcontroller with a instruction set consisting of just few basic instructions is called Reduced Instruction Set Computer(RISC).
Instructions Set of ATMega16 consists of 131 RISC type instructions. Most of which can be executed in a single clock cycle. Therefore ATMega16 operating at 16 Mhz can execute 16 Million instructions per second. Wow!
The CPU of ATMega16 is designed using Harvard Architecture scheme. Hence the program memory is kept separate from the data memory.
——to be continued