1 Unit - 1 AVR Architecture 21 02 2025
1 Unit - 1 AVR Architecture 21 02 2025
Dr. R.Girisha
Professor,
Dept. of C.S & E.,
P. E. S. College of Engineering, Mandya.
Atmel Atmega32
Central Processing Unit
Arithmetic Logic Unit (ALU) performs the actual arithmetic, logical,
and bit-functions
Memory – SRAM, EEPROM, Flash, etc.
Clock circuit – internal/external
I/O – Input/Output; video, serial, parallel, USB, SCSI, etc.
AVR architecture
o Harvard architecture
supports parallelism
Separate memories for program
& data
Next instruction is fetched while
current is executed
Fast access register file with
32x8-bit general purpose
register,
Atmel Atmega32 highlights
o An 8-bit microcontroller featuring:
3 separate on-chip memories (Harvard architecture)
2KB SRAM (for data – volatile; data lost on power off)
1KB EEPROM (for persistent data storage – holds data after power off)
Data
SRAM "static"
o Non-volatile:
Read Only Memory (ROM):
Mask ROM "mask programmable"
RAM:
Volatile memory for storing the runtime state of the program
being executed. ATmega32 has 2KB bytes of RAM memory.
EEPROM:
Electrically Erasable Programmable ROM. Is a non volatile
memory. Individual bytes can be erased and rewritten. Used to
store semi permanent data. ATmega32 has 1KB of data EEPROM.
Programs are stored here
oR28-R29 Y register
oR30-R31 Z register
subroutine/interrupt calls
Storing temporary data
and local variables
o Program counter (PC, 16-
bit)
Holds address of next program
instruction to be loaded and
executed
Automatically incremented when
the ALU executes an instruction
SREG($5F)
AVR Status Register-SREG C- Carry flag
D7 D6 D5 D4 D3 D2 D1 D0
I T H S V N Z C
D7 D6 D5 D4 D3 D2 D1 D0
I T H S V N Z C
D7 D6 D5 D4 D3 D2 D1 D0
I T H S V N Z C
D7 D6 D5 D4 D3 D2 D1 D0
I T H S V N Z C
D7 D6 D5 D4 D3 D2 D1 D0
I T H S V N Z C
D7 D6 D5 D4 D3 D2 D1 D0
I T H S V N Z C