UNIT- 4
Tntrodutuon ko to ATMEL AVR
AVR Mico Controlen
AvR Ar di kecte
deignad by two
y The bane anibetwe o AVR ws
wtat'an. Tnstikute ot Technolo gy. Then
Skudents o Nor ATMEL
Was develope d by
AVR- Advan cod Vrbual RI SC,
procetor. Ex cept AvR32 C32-bit)
AvRs all &-bit that
MU'c conlo llos
it AVR
One Pro blem terms o sottocse,
Compal'able in
not all
one
taroily
lo a o theY
tamily
going progrankome regisler localions
must e Compi le the
we
and pok bly clange
betore Aooding
G AvR caitiahion:
4 hroups laic.
Tiny , Specal pwpose
Mega T
AvR Featnes Sihgle cup mitrolontolea
g-bit RISC Bome
Comes wit
AVR
nclu'teuye that
wth
Hanvndfe alunos uch
Beandad ROM
On chip pogras EEPROM
cu D ata RAM
On
TU'mes
I/o Ports
n've- ADc, PwM, Seu'al nteae
y Addi ona Fiatwre
0SART, SPI, I2c, CAN, USB
AvR Mirn contllen Progam RoM: Coled
Progm. I t is
ore the
Code ROM. lkB-a56k8.
program
progam memomy
Va'es prom Ik
4iee roicro conlonlle2
o te
Tbe AvR ws
lash memomy for prsgn Storage.
to on- chup
erse
G Flash memony is fater e Easy to RoM
orgamhon
Adobess
RomCBytes) OO00 o-o03FF |Kx2 bytes
ATkiny as 2K
Ooooo-00FFr 4Kx 2bytes
ATmaga O3FFF 1bkx2 bytes
ATmeaa 32 32K 82X2 byles
bhk Oo00o-otFFF
AT mega bt 64x2 byes
l28k OOooo -0FFFF
ATmaga
128
25Lk O000o- |FFFF
j28X2 byles
256
ATmega
AVR Mieoconlmle RAM and ÉEPRoM:
BRre data. AVR basa malmum o
64kB data RAM. CakB SRAM) ATmega 82)
y Data RAM: 3 Components
General Pupose Regiaees
* I/o meme
* Lnte9 nal SRA M.
There 32 geneal pupose regiskers' wi al o
the AvRs
y The TonnaL SRAM Bpace
s Lbed tor veadlwile
sc rateh pad ala
EEPROM to sora c h ' a l
A Bnall amount ot
that does bed to be changed voy often.
of
C1o24 Bytas)
AvR Mero Controlle TJo Pens:
y he ATmaga 82 ho pin hp
are aside or the toun pots.
A tolal o 3a pihs
plhs
PoRT A,PoRT B, PoRT C PoR TD
PAo- PA, PBo-PB+, Pco-Pc+, ppo-PD+
ALU:
y The ATmeg a 32 Contia ot s-bit ALU.
y The Anthmetie and logie untt is detiged to
pertosm authmote and Rogical operati ons.
This tnludes Aoldkon, Sblnct'on, NOT, AND, OR et.
Genenal Paapose Regisks
ko tlore daka kempily
we many rejttes Ao Btore iotomation.
used
Dn CPU dala to be
Unfosmation cold.be a byte, o
Y That o toe data to
poo cessed, OY
an adalbess poining
be telbed 8- bit.
tbe
In AVR mayoty o
D D Ds D ,Do
LSB
MS8
Tn AvR here 32 gereml pupose egers.
Ro- R3| and kocalled in the lowet
Tbay addross.
localion ot marmeny Bme as t e accumuldtor
the
AvR
y The GPRs Ro
mi'co Conl a . Ri
other R2
:
Rl
RS
AVR STATUS REGISTER:
8-bit ragiter tt ç alao
vefemed as tag egister.
Do
SREG I TH N
C- Carny Plag
N- Negative flag - Condlional Fla.
V - Overow Flag Condins
S- Suhn bit flag They (ndicate Romean LntuHons
thal eslts atter
H Half Caoy Flug
T- Bit Copy skoYage Enable
I- Global Dnhenupt
o peaorm
L Each o-the Corndi kional Pag car be usedd
Can
opditional brunh Cjump)
Progm Gounler:
he CPU to point to the
y The prpgam Countes cs used by exe ubed.
ko be
addrss oo tbe ne xt (nstrutio n irn tbe pogrm
Form
GAs tbe CPU Rtchs the opode incemened autormalically
Pngam Counter s
ROM he
lo the net Cnstuion.
do point the. more memony doalien,
weder the Pongam Counter)
CPU Can acce&S.
Counler Caun accey a rnamm o
14-bik pg am
Dbk (alt = l6k) pongm memot localions.
Dh AvR mioConlo ller each Plash memoylocalaon s
2-byles wide
32.k8 lbkx 2bytes.
ATmega32 Q2 bit
y Maumum vpko png um Counten can be sec in AVR.
STACK PoiNTER
|e-bit g-bit
Sp: SPL
The ack ç secbron RAM useo by the cpU to
Btore cotosmaton Aempriy Y n adlres
G Th Dntor nation could be datu
the laLk s callo
esed o aceess the
ack pointe regter.
pace , there Sp).
Lo TJo memony bule o4 SP) and SPH CHu'gb byte o
Damed 6PL Clow byles the SP
les than Q56 a56 byles
AvR& wcth
-bit gter on addess 25b
ab an
ony
o memy.
peupbeal:
AVR micmcontroler ADc,tmers V ART.
AvRS Come wtb
Mot o Asynchronous Receien Tranmitter
CUnivsal Synchonous
ADe
lo to lb bil
AT mega82
U SRT -Seuial poot
the AvRS ComS wtth L»c, SPIbuses
and some ot tbem o CAN Buus.
b Araleg Conapanakos
y 4 PwM clhannls
Progammable Wakch Dog Timey