Line 22: Line 22:
 
**Digital
 
**Digital
 
==The ALU==
 
==The ALU==
 +
The ALU of an AVR MCU process data 8 bits at  a time. It performs the arithmetic and logical operations. The data for the ALU comes from the registers.
  
 
==32 General Purpose Registers==
 
==32 General Purpose Registers==

Revision as of 20:30, 28 September 2014

Why learn AVR Architecture?

Learning architecture of the micro-controller gives deep understanding of how it works. It also enables in writing better software for the same. Also programmers who understand the underlying hardware tend to write better programs.
The entire tutorial series will be based around Atmega32 MCU from Atmel. Hence in this tutorial we will look at AVR architecture in general however all the specifics would point to Atmega32.

Block Diagram

Fig below shows the architecture of the MegaAVR series of controllers. As with any MCU ALU forms the core of the controller. A typical AVR Mega Series MCU has following hardware units inbuilt:

AVR Architecture.GIF
  • The ALU
  • 32 General Purpose Registers
  • Special Function Registers
  • Static RAM
  • EEPROM
  • Flash
  • Timer/Counter
  • Compartor
  • Watch Dog timer
  • Protocols: UART, SPI, I2C
  • Interrupt Handler
  • IO Ports
    • Analog
    • Digital

The ALU

The ALU of an AVR MCU process data 8 bits at a time. It performs the arithmetic and logical operations. The data for the ALU comes from the registers.

32 General Purpose Registers

Special Function Registers

Static RAM

EEPROM

Flash

Timer/Counter

Compartor

Watch Dog timer

Protocols: UART, SPI, I2C

Interrupt Handler

IO Ports