Professional Documents
Culture Documents
Telecommunications
• Mega 103-64-6-128K-4KRAM-UART-ADC
• Mega 603
• Tiny 10- 8- 10-1K
• Tiny 12
• Mega 8
• ATMega 16
• ATMega 32
• Visit
• https://www.microchip.com/design-centers/8-bit/avr-mcus
Unit-V-Introduction to AVR RISC Microcontroller
10
Architecture
Department of Electronics
and Telecommunications
Source : www.microchip.com
Source : www.microchip.com
Unit-V-Introduction to AVR RISC Microcontroller
ATmega32 datasheet Architecture
20
Department of Electronics
and Telecommunications
ATmega32
Source : www.microchip.com
Unit-V-Introduction to AVR RISC Microcontroller
ATmega32 datasheet Architecture
21
Pin Diagram
Department of Electronics
and Telecommunications
Used as
bidirectional I/O
port and 8
channel ADC
Source : www.microchip.com
Unit-V-Introduction to AVR RISC Microcontroller
ATmega32 datasheet Architecture
22
Port B
Department of Electronics
and Telecommunications
• POINTS TO REMEMBER
Program memory 16 bit wide.
Program memory also stores interrupt Vectors.
Data Memory is divided into
a) Reg.File with 32 reg.of 8 bit each.
b) 64 I/O reg.of 8 bit (some have more)
c) Stack Pointer 8 bit, some times 16 bit.
(If no SRAM then internal 3 locations serve as SP)
d) External SRAM
Unit-V-Introduction to AVR RISC Microcontroller
26
Architecture
Department of Electronics
and Telecommunications
0000
0000
32
Reg.File
$1F
$20 $ 00
64 I/O Reg.
$ 5F $ 3F
16 Bits Internal 8
SRAM
00 R0
R1
0F
R16
R26
X Register Low Byte
R27
X Register High Byte
R28
Y Register
R29
R30
Z Register
1F R31
• Status
• Stack Pointer Note : The number of register may change
Depending upon the chip specifications
• Interrupt -- 2 nos.
• MCU --- 2 nos
• Timer --- 7 nos ( For 2 timers)
• Watch Dog Timer --- 1 no.
• EEPROM ---- 3 nos
• Port B --- 3 nos
• Port D --- 3 nos
• SPI – 3 nos
• UART – 4 nos
• Analog Comparator --- 1 no
7 6 5 4 3 2 1 0
I T H S V N Z C
Program Memory
Source : www.microchip.com
H.W
Unit-V-Introduction to AVR EEPROM
RISC 1 K memory
Microcontroller
ATmega32 datasheet 35
EEAR ,EECR and EEDR register
Architecture
ATmega 32 Clock Department of Electronics
and Telecommunications
Distribution
Source :
www.microchip.com
ATmega32 datasheet
Source : www.microchip.com
ATmega32 datasheet
Unit-V-Introduction to AVR RISC Microcontroller
38
Architecture
16-bit Department of Electronics
and Telecommunications
Timer/Counter1
• True 16-bit Design (that is, allows 16-bit PWM)
• Two Independent Output Compare Units
• Double Buffered Output Compare Registers
• One Input Capture Unit
• Input Capture Noise Canceler
• Clear Timer on Compare Match (Auto Reload)
• Glitch-free, Phase Correct Pulse Width Modulator (PWM)
• Variable PWM Period
• Frequency Generator
• External Event Counter
• Four Independent Interrupt Sources (TOV1, OCF1A, OCF1B, and ICF1)
Source : www.microchip.com
H.W : Timer /Counter 2 Unit-V-Introduction to AVR RISC Microcontroller ATmega32 datasheet40
Architecture
Serial Peripheral Department of Electronics
and Telecommunications
Interface – SPI
• Full-duplex, Three-wire Synchronous Data Transfer
• Master or Slave Operation
• LSB First or MSB First Data Transfer
• Seven Programmable Bit Rates
• End of Transmission Interrupt Flag
• Write Collision Flag Protection
• Wake-up from Idle Mode
• Double Speed (CK/2) Master SPI Mode
Source : www.microchip.com
ATmega32 datasheet
Unit-V-Introduction to AVR RISC Microcontroller
42
Architecture
USART
Department of Electronics
and Telecommunications
Source : www.microchip.com
ATmega32 datasheet
Programming AVR
Instruction Set
• Datasheet of AVR
• Chapter 1-4 , Programming and Customizing AVR
microcontroller, by Dhananjay Gadre
Questions???
Thank You