AVR_ Microcontroller_Muhammad Ali_Mazidi_AVR_Lecture2_Fall2023

harismohsin 193 views 18 slides Aug 17, 2024
Slide 1
Slide 1 of 18
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18

About This Presentation

AVR Microcontroller Muhammad Ali Mazidi


Slide Content

www. Mi cro D igit al Ed. com
BIH E universit y
AVR Microcontroller and Embedded System Using Assembly and C
Mazidi, Naimi, and Naimi
© 2011 Pearson Higher Education,
Upper Saddle River, NJ 07458. • All Rights Reserved.
Introduction to AVRIntroduction to AVR
Chapter 2Chapter 2
The AVR microcontroller
and embedded
systems
using assembly and c

www. Mi cro D igit al Ed. com
BIH E universit y
AVR Microcontroller and Embedded System Using Assembly and C
Mazidi, Naimi, and Naimi
© 2011 Pearson Higher Education,
Upper Saddle River, NJ 07458. • All Rights Reserved.
TopicsTopics
•Microcontrollers vs. Microprocessors
•Most common microcontrollers
•AVR Features
•AVR members

www. Mi cro D igit al Ed. com
BIH E universit y
AVR Microcontroller and Embedded System Using Assembly and C
Mazidi, Naimi, and Naimi
© 2011 Pearson Higher Education,
Upper Saddle River, NJ 07458. • All Rights Reserved.
3

www. Mi cro D igit al Ed. com
BIH E universit y
AVR Microcontroller and Embedded System Using Assembly and C
Mazidi, Naimi, and Naimi
© 2011 Pearson Higher Education,
Upper Saddle River, NJ 07458. • All Rights Reserved.
4

www. Mi cro D igit al Ed. com
BIH E universit y
AVR Microcontroller and Embedded System Using Assembly and C
Mazidi, Naimi, and Naimi
© 2011 Pearson Higher Education,
Upper Saddle River, NJ 07458. • All Rights Reserved.
5

www. Mi cro D igit al Ed. com
BIH E universit y
AVR Microcontroller and Embedded System Using Assembly and C
Mazidi, Naimi, and Naimi
© 2011 Pearson Higher Education,
Upper Saddle River, NJ 07458. • All Rights Reserved.
6

www. Mi cro D igit al Ed. com
BIH E universit y
AVR Microcontroller and Embedded System Using Assembly and C
Mazidi, Naimi, and Naimi
© 2011 Pearson Higher Education,
Upper Saddle River, NJ 07458. • All Rights Reserved.
7

www. Mi cro D igit al Ed. com
BIH E universit y
AVR Microcontroller and Embedded System Using Assembly and C
Mazidi, Naimi, and Naimi
© 2011 Pearson Higher Education,
Upper Saddle River, NJ 07458. • All Rights Reserved.
8

www. Mi cro D igit al Ed. com
BIH E universit y
AVR Microcontroller and Embedded System Using Assembly and C
Mazidi, Naimi, and Naimi
© 2011 Pearson Higher Education,
Upper Saddle River, NJ 07458. • All Rights Reserved.
9

www. Mi cro D igit al Ed. com
BIH E universit y
AVR Microcontroller and Embedded System Using Assembly and C
Mazidi, Naimi, and Naimi
© 2011 Pearson Higher Education,
Upper Saddle River, NJ 07458. • All Rights Reserved.
10

www. Mi cro D igit al Ed. com
BIH E universit y
AVR Microcontroller and Embedded System Using Assembly and C
Mazidi, Naimi, and Naimi
© 2011 Pearson Higher Education,
Upper Saddle River, NJ 07458. • All Rights Reserved.
11

www. Mi cro D igit al Ed. com
BIH E universit y
AVR Microcontroller and Embedded System Using Assembly and C
Mazidi, Naimi, and Naimi
© 2011 Pearson Higher Education,
Upper Saddle River, NJ 07458. • All Rights Reserved.
12

www. Mi cro D igit al Ed. com
BIH E universit y
AVR Microcontroller and Embedded System Using Assembly and C
Mazidi, Naimi, and Naimi
© 2011 Pearson Higher Education,
Upper Saddle River, NJ 07458. • All Rights Reserved.
Most common microcontrollersMost common microcontrollers
•8-bit microcontrollers
–AVR
–PIC
–HCS12
–8051
•32-bit microcontrollers
–ARM
–PIC32

www. Mi cro D igit al Ed. com
BIH E universit y
AVR Microcontroller and Embedded System Using Assembly and C
Mazidi, Naimi, and Naimi
© 2011 Pearson Higher Education,
Upper Saddle River, NJ 07458. • All Rights Reserved.
A brief history of the AVR microcontrollerA brief history of the AVR microcontroller
•The basic architecture of AVR was designed by two students of Norwegian Institute of
Technology (NTH), Alf-Egil Bogen and Vegard Wollan, and then was bought and
developed by Atmel in 1996.
•AVR stand for: AVR can have different meanings for different people! Atmel says that it
is nothing more than a product name, but might stand for Advanced Virtual RISC, or Alf
and Vegard RISC (the name of the AVR designers).
•There are many kinds of AVR microcontroller with different properties Except AVR32 ,
which is a 32 bit microcontroller, AVRs are all 8 bit microprocessor, meaning that the
CPU can work on only 8 bits of data at a time.
•Data larger than 8 bits has to be broken into 8 bit pieces to be processed by the CPU.
•We will focus on Atmega32 since it is powerful, widely available, which make it ideal
for educational purpose.
•The AVR is an 8 bit RISC single chip microcontroller with Harvard architecture that
comes with some standard features such as on chip program(code) ROM, RAM, etc

www. Mi cro D igit al Ed. com
BIH E universit y
AVR Microcontroller and Embedded System Using Assembly and C
Mazidi, Naimi, and Naimi
© 2011 Pearson Higher Education,
Upper Saddle River, NJ 07458. • All Rights Reserved.
AVR internal architectureAVR internal architecture
PROGRAM
ROM
PortsOSC
CPU
Timers
Other
Peripherals
Program
Bus
Bus
RAM
I/O
PINS
EEPROM
Interrupt
Unit
40 PIN DIP
10
11
1
2
3
4
5
6
7
8
9
12
13
14
15
16
17
18
19
20
(XCK/T0) PB0
(T1) PB1
(INT2/AIN0) PB2
(OC0/AIN1) PB3
(SS) PB4
(MOSI) PB5
(MISO) PB6
(SCK) PB7
RESET
VCC
XTAL2
GND
XTAL1
(RXD) PD0
(TXD) PD1
(INT0) PD2
(INT1) PD3
(OC1B) PD4
(OC1A) PD5
(ICP) PD6
MEGA32
31
30
40
39
38
37
36
35
34
33
32
29
28
27
26
25
24
23
22
21
PA0 (ADC0)
PA1 (ADC1)
PA2 (ADC2)
PA3 (ADC3)
PA4 (ADC4)
PA5 (ADC5)
PA6 (ADC6)
PA7 (ADC7)
AREF
AGND
PC7 (TOSC2)
AVCC
PC6 (TOSC1)
PC5 (TDI)
PC4 (TDO)
PC3 (TMS)
PC2 (TCK)
PC1 (SDA)
PC0 (SCL)
PD7 (OC2)

www. Mi cro D igit al Ed. com
BIH E universit y
AVR Microcontroller and Embedded System Using Assembly and C
Mazidi, Naimi, and Naimi
© 2011 Pearson Higher Education,
Upper Saddle River, NJ 07458. • All Rights Reserved.
AVR different groupsAVR different groups
•Classic AVR
–e.g. AT90S2313, AT90S4433
•Mega
–e.g. ATmega8, ATmega32, ATmega128
•Tiny
–e.g. ATtiny13, ATtiny25
•Special Purpose AVR
–e.g. AT90PWM216,AT90USB1287

www. Mi cro D igit al Ed. com
BIH E universit y
AVR Microcontroller and Embedded System Using Assembly and C
Mazidi, Naimi, and Naimi
© 2011 Pearson Higher Education,
Upper Saddle River, NJ 07458. • All Rights Reserved.
Let’s get familiar with the AVR part numbersLet’s get familiar with the AVR part numbers
ATmega128
ATtiny44
Atmelgroup
Flash =128K
Atmel
Flash =4K
AT90S4433
AtmelClassic
group
Flash =4K
Tiny
group

www. Mi cro D igit al Ed. com
BIH E universit y
AVR Microcontroller and Embedded System Using Assembly and C
Mazidi, Naimi, and Naimi
© 2011 Pearson Higher Education,
Upper Saddle River, NJ 07458. • All Rights Reserved.
Questions and AnswersQuestions and Answers
END
Tags