0% found this document useful (0 votes)
10 views

mci-1

Uploaded by

Utsav Savaliya
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views

mci-1

Uploaded by

Utsav Savaliya
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 25

the thqh aecanneted all Jhese

thadata tht and


data teinhut
the d
aetion. wnt
lasedSloedata hemeWsLd
RandonAces
Jmo RAn
emey onRend Rom-
y e Which
sStoedl eccte to
P
Basics
nicecotaole
8051
Dsla
Data

Bo51 icoscantaler oenie)

RAM Ro.n Tlohes


tmsnsintennuhtosenial St contatnsRAN itet
hot'etell ilt on
lo Ro.neT loatRAnRomT o hants
aingle chi ainqe chih
8051 s an 8 - t m i e c n t e 2. t is hiahysensaie
dueto ide ange afsheciic tasks
task
aithemte andJogical aenatias
8-ta 3
to etexnalcomaentous to uilt in
inturnaL RAMaf 28 B and andalae heuud comhonants and a
internal Romaf 4kB ange snce. unuired amall hace

2,6-it timans lhich acth


CentenK- eitdata lus, l s - t addreAs
hae
l s 5 intauht 5.3ts hnncaxaina ahsad i t ¢jrocssina ahudia
high dueto etena
Also eotnal Rom and RAR al s4 kB Eocamhsnents isised
Borajacied taska

nathustisnsdth inatudtanseith feul


Laile addhessin addsbig modes.
Modes
O05
iq.i-Ro855086, fq.i- SoSL, ARM,
intel couis,5 cantae-n ete
iet.. P\.0 Vcc
PI. 2 39 Po.7CADo )
Pl.2 38 Po.sCADI
acemhutenslhteh Wke Ac hemotelen PI.3 37 Po.sCAD2
hasazqe shace TV eliqenator ete. Pl.4 5 36 Po.4CAD3)
lhich hasitod PI.5 35 Po.3(ADy
P\.G 34 Po.zCAD5
shae 33 Po.I (ADs
RST 3 32 Po,oCAD7)
805LUc Pin Diagram P3,0
B05 31 EA
30 ALE
TNTODP3.2 l2 29 PSEJ
CNTI) P3.3 13 28 P2.7( AI5)
To ) P3,4 |4 27 P2.6 (A4)
fo CT) P3.5
nteaLRon 26 P2.5(AB)
WR) P3,6 25 P2.4 CAl2 )
RD) P3.7 24 P2.3 CAuD
XTAL2 23 P2.2 (Alo)
Relat
XTALI 22 P2.| (Ag)
So51WC
20 2( P2.0 (As )
AL E
PSFN
RxD
FA thigg the Wc at 2 2Hz

SntnalRAN TUIL
Ve Rest’ Broceshar
RAM Rest
WR
RD
D6

Rom cententsnehetained Jhen ALE =LADo-ADI caies Ao- Al


Pcioo00H Proqan stats ercectton dhen ALE =Q ADo-AD7 caries Do- D7

LALE’Adres dath Ealle


LntRon ise= 4kB
te ceheatienint address is 22x2lo
Snt to that addess
bentthendatai =2l2 B

Sete heduce the ne ins lth


multhleed
00 H >0FEFH

t, Rom> 0000H to oFFFH

*. Ao - Al5 Ao-A Io Ag -AI5 Lhen EA=0 : i t . Rom stat hem Q0o9H


teans nt Rom dihcandad
Boderute Righer t
lhen FA=| at. Ro.m atants ram looo
t means int. Romceliuec

PSEnJ Pregham Atatus Enalle


tor est, Rom RSE actsas hea siqna
Ao -Aand Do- D ane multihleead
' ADo - AD
As - AIs aliays canis highea duyt
Dte

Altenate tuncttona i B051 Uc Architeture Bloch ingam i


Po-> AD - ADo
PINlealtunctian
PB2’ AIS- As

usedlhen ent. ath KTAL


RESET
TAL2
Alt.unciansane o
iscoected w

commay
Palan atunisns RA l2fs
B
P3.o>Rxo aeninlhet 305L
P3.lTxD
7FH |oF
HFH
A
P3,2TNTO iathanddnne itanukis
P3.3>TNTL
P34 To inen ack inhut
P3.5IL 3a
DeTR
P3.s> WR antaal ianals lor Eoct. AB
P 3 >RD RAm ALU

himay
man u c i s l o n t 3
Precbo Pat

ccumulat,
>he egites A is heheedas
Ai s-eit eaitthat holdthe int
aheinndant andalsn qtthe h e t
gtheahanation
DP TR i stand fordata hona
data thanles t o a n d metMemy

multhlrain and ditaien.


ALUlanms E- t aithmote and dagical
ehehatens,

9t can alejefarn ehe lit oeratians


ntenol RA:

Bise-(2% B 21B
+ialke calledas lag aisterUsed
teindirat status afthecnent est
Sast adde =0O l H = o 7F H

ahenatin ntoal Roni

9+ isale ait addesalde Bis- HkB 22x20 B = 212 Bo'. |2 tsa

3istadds
astndbs
O 2 Pa3

6 5 2

these
Et.mouane Cennected thae h CY AFoRSL RSo OV p

Alqnal.
P- Paitiyg
to cantaal the haniua

gilen y Pc.
ememou
DPTR is miny usedfor
haint thedata

the dato

Pc- tonnalsnnd etina Rom


DP TR - ntena Rom &St rt RA
tTtT
Lat. RANcan leaccesbed l d d e s a i q
medes
8051Ic PSW - 3. AC -Auiliaany ag

the atatus the esut


-
S+ is t addisalle t heqiste
Dets

15

34 2| 4 2I

Jhese unlens halkenagnitdeof 23cocnlemant

" 2 = 2 5 6 ’ 0 0 H to FFH
o to 255

Rangf iaud d = 2 % . 7 - ltubed

th -lt Ibed

21=l28>oo H toFH
(oto 27 9t is ubed to datact the eiis
aithematie eenaios
+39 H
60H
Rom
CY=04 AC = P=0oVR=o OFFEH
t
LooL
2_ -27 H
-39 H
-6o H Rosn
=26B
CY=L AC =LP =00R=O 6okB.
FFFFH
5 RSo and RSL - Reqistan ank balect
LwhenFA=0nt Rom s discaded
Fo -wsen deined ag
SET B PSW, 5
CLR PSJ.5 Et. Rom

So51Wc emsuy naanianlion iLteraal RoM af 64 kB


-> Rom i
EtRon
G4RKB meeaOSLdoes t
ooooH =4 kB check EA As t a
Snt,RoM = 2 X 2l0 B in Eot, Rom
4kB =212 B FFFFH

oFFFH
RAM Ragisten Banki
int.RAN and t , RA ltes )a nt.RAn
3or RAnloth The gist 32Jacattas
ceeit t otintefed. qanenal
hunaseuaitns
t. RAN t.RAN
125 B -7 Bt thes 32 ugistsane dided to 4
Lnt. RAM nekerediscadad

FH enenaluhase
CatachhadRAn Bank ois saltd ydeault
30 H
2FH 7E 7 7D 7C78 7A 79 7K
2EH Bit saddeade

O7 06 05 0403 020| 00H


20 H
|FH R eahaaaiate
Bank 3 Jhe ahnahriate lank is lectd ly RSo
Ro
R
Bank 2 32 kutes Bit AddldeAua i
oH Ro
oFH RI
Bank L
Ro Jheneane l6 l t e n this anee
o7H R

Ro
(O20

0oHto EH_ Same


SP-SP -L
t adde KO5Luc SFR i

Bt dth eitand dte hale ilenent


SER Atands gor aharinl funtion uais
instuions
Thenaxe 21K-t SER

anealhich an e
Jo Aaduce the n s e ohcodes SFR°a ni

Snt. RAN has 2% Jutesthen ianqet


&tack -
Ashce SER> ane allatd from %oH to FFH.
>stack is a bot oe memoy dacaliob that
ahenatinq n dast in liat t hanler,

t nlyhesentn intenal RAm

canony atain 8 - t addesb

PUSH SPE-SPt|
Data ush in mem
[sPlNedote
Ro a) noVA
Redo cantent qt A
ARoAGRo noV Eq.' Eq
diacty inatulan
nat
2
43oH 30Hl
3oH E H
3o oV |q
haintsTo DPTR
DPTRG2o00H
2099H F DPTR noV
H
25
A25H
ntsoacatin
H25 qt A sdicy negistan malkete
A 25H îata
A,25H io.ok 25H E AoV fqi
SFR'A and RAn nt eany is St idante Value data
nstauon in
aen diethy
3inatucion gien
in isDataSmmediat,-
insthion bam gistans
in RAM
Hence
inathucten
ne the
RoRt
allad >oV desAddessn uc&051
i
23 O
Date
Page

Ro

SnoV RoE2oH

Agtctnt Lacati 2H Lich


is hinted y Ro

OV DPTRE4oooH
29VA DPTR
i. A qt contnt
facatian Hoo0H
whichis hointed ley DPTR.
o26
B051 c dnatucions 5. TNC 25H Snchemsnt cantentoe docattan
25 H

ADD A HASA25H
E25 DEC A I9. DEa 25H
2. ADD A RoASAt Ro DEC Ro 20. DFc nRo
ADD A 25HAA+25H 2LINc DPTR.

4 ADD A ReRoRiAEA+Ro 22.ULAB B.A AX8


Ro
R
5. ADDC A # 25HAS+25H tCY 23 DTVAB B.A < A B .R> Reminden
R
9-utient
6 ADDC A Ro
24DA A SDecimaladitaltendd
ADDC A25H
ARTre din the addeutt isin the
ADDC A, a) Ro Bomag hearecimal
But idealythe hesut shouldlse in the
SUBBA E 25 H:ASA-25H -CY om fdecimal

SUBRA Ro Hence DAA i uedtocokert heredecimal


ueh todeimumle
UBBA, 25 H
A
l2 SUBBA Ro
3
Ac =L
thenadd 60 thenadd o6
24 H
t30 H t 25 H +9A9H
50H = 50 3 2H
25 H AC =|CY=L
t25H
4AH hLe A Add o6 o 32 H=38H

Ad o6 to HAH =50. Add Go to 3}H =|9%H =9%

2
t2sH>AC =
5 OH 25. ALA#25H AGAAZ5 H
Add o te 5oH 56 A 26. ANA Ro L25H
21.AnA 25H 29, AUL 25HA

50 H 28 ANt Aa)Ro 30. ANL 25HF25H


+ 50 H t50 H
AOH nHn A 3L ORL A #25HAGAV25H

Add So to AoH= 60H 32 D ORL A RO


+Ao H
33 ORLA 25H
q so H 34 ORL Aa) Ro
35. ORL 25A,A 2:25HhsHvA
Cy=
RLA=
Ji
cany ith ielt Ratat 45.RLcA
lo90 CY=L RRA=
thecantents
Asae ARtate
felt RL 43
25H 25H XRL 42
A XORA
L25HsH 25HA XRL 4L
A25 H XRL Ho
A,a XRL 39.
RoXORRoA XRIA 3%.
AJ contents
ag the RRA-Rotate
Right 44 XOR A 25H 31XRL
F A
25H
25H#25H ORL 36.
O33
49 SLWAPAAtn
RRC AAe Rotate Rqht tthcay
5o.

Jhi stuctio ib ud to educedela


3,Roola

52 SETB C b ’ St t
RRC A= looo
53.CLRC c l e a Cany
54.CLR b
Rtates aMbd doteminothe alue
55. CPLcComhlemantcCE< cE

Rotatthese t in acand. check the

4 CRLA Complemant A inatn


5%.
Canhlamnt the alue Axgisten
59 AnNL Cb. So. ANLcb>cb
62. 0RLcb’cV
CLRA ceL A gisten
Or 35

PoP add
accunudat
PoP SP=25 H 6SP
Dota anber i SP = SP-l

63. MovAE25H AC25 H 75.XcH ARa change


nOVA Rat Ro-Ra3 A Ro cH A Ro AS> Ro
65. noV A 25HA 258 XCHA d d

66. novA, RP Ro R3 XCH A25 H AS25H

67. nV XADPTR AGLDPTR xH A, ReRoRI


DPTR,A:LDPTR A XCHAa RoASLRo.
R
XCHD A(mRPRo RI3 D- Ditt
XCHDA Ro A s Ro
A
ll.ov c A a t DPTR 5. Branchi

2. nov DPTRF25 H 1.SrRP>hat um


13. PUsH add

PUSH SP = SP<SPt
seL25H
SJNP

to another
BuntaseSJnPhadd

calutate thu t stut

ecalien in RoMllholeange
bise 2B
5000 H
cade-lB) (2B - PC= 200oH

se 3B

Range 0009 H -FFFFH


PC=20ol
PeLadd PC=2002

he majn diaadantagothitct PC=200R XxHCLB

Pc ibcalculatd fram 2002 H ot


38 caatains 3 machine cycle ecauhe Bo5L 2000H

hisis ecase SJNP o B ndad


O 3

Beddo alcuated 2kBO000 H


PL
natucllan
oEFEH
Range i -|28, 281-5o H-0o H- 7EH 2 klB Q%00 H
P2
Pc PCt d d oFFFH
2kBoooH
P3
he main dlindantage of this nstuckan

P3
FFFFH 2kB=2XLkB.
=2' 2l0 B
ATNPAtands foraltaitemh
t
ytai
shotandds
chanqed t hiahen 5 to
Jhe GHkB_is diided into ages oß 2 kB
Be thene ee 32 haqes fism 0 Io 3L Ahaldeqlen instutian,
Same
Same

iumhs to athen aqes,


Ranqe 2 kB 0000H - FFFEH Hence the hiahen 5 eit
canstant
AJNP 7H Pc= l234 H
STMP hadd
LB) CB)
AJNP badd
nthle hage
thibhage thee

H H 279 H 37H 4H_


loz9 >calsi
82ACALLul
P50tconstant t30t t & t
83.CALL S l
he emaininq 3its ane en dthe
ahcadeg ATNP. Retuni

84.RET

85 RET T
Brthene eeKohcades fanhese 3-Rs,
H Conditioaal qums
PC= Isooun te l202 H
hich dehendin ha the
AJnP 02H Gor l2Hthene ib cendiiols eecaled Conditisals
AL ceditirnal umhs
he nn disadantageof this instucRsA
ohcades,
’ condlian istue then t jumhs Io
shcilecdabe
then it hnsced te net inat
2 OP 3

CINE A #25Hadd

CINEComae and n not

DInZ RI BACk
Cemhais A a and 25H A= 25H
astDINZdecments Rz y-0lH
nethinq
CJlE A25Hadd -> an thi Liay255 teaais an hduced

CTNE Rx 25H, add 0JZ 25Hhadd

CINE a Re25Huadd 42

93

DInz’ feczement and umh nt


95.

96.
DINZ RIBACk

tdecament R J l the R7 ecmes0,


ahe ttanatas jnaduce is eocactly the
Bame oconto

Spcanto =nttertinns rount=


45

Panqramminq og KoSLUci Snoy RI Qo H noV A20 H

9-LJAt an ALP tomuty thecontents


2LH.toeth4
ofdacation 20 H and ADD A RO
eutatacation 22 H and 23H. MoV 22HA
JNc SkIP
Mov A 20 H. MoV A20H TNCRI
MovB2\H.
OR NULAB SkTPi oV 23H R
MUlAB MoV 22HA
MoV 22 H A

mov 23H B. HeiSTMP Hee 9-4etean ALP toadd the content o


Hee STRP Hee Jocatin 2000o H and 2001 H, Stoe the
etat2002 H a w at 20o3H
9-2.JAta ALP t dide t 15H ey tE12H
stoe the u t in Ro andheminde MoV DP TR #200o H
n Rloank 3. MoADPTR
Mov RoA
SFT B PSJ,3 TNC DPTR
SET B PSW,4
Bak 3
ADD ARo
ShoyB#\2 H
DTV AB MeLNC DPIR
Mov RO A Mox DPTRA TNC DPTR
J c SkIe
Hee STMP here TNc RInov ARL
Q-3JD JWte anALP to addthe cotnt SkTei novxa DP TR ft A
location 20 H ad2Htothe
r e t at 22H cau 23H Hezei STNP He
allockoR lo
2 - 5 . d t h ALPto tranalen
30H.
Rromlocation 20H to 9384 H.
Ro
mov RO20H
roV RO,E4o H
MoV RI30H
NOV R2oAH BACKiNok A(a RO
MovaRA OR
TNC Ro TNC Ro
INC RL BAC k: oV DP H RL
DcR R2 DJNZ R2 BACk mov DPL Ro
mov A DPTR
HeeiSJMP Here TucDPTR

99-6sina dame nagram do 20 Hto 2o90 H.


mokDPI R2
MokXDPR A
moV DPTRE2000 H TNC DPTR
noy R2FAH Mok R3 DPH
BAC K mov a A Ro 7oV R2DPL
Mov DPTR A
INC Ro DTNZRI RACk
TNcDPTR
DTNZ R2 BACK HeisJNP Here
Hee STNP Hee
Oate

->

aimens eaed toroducedelays

Ko51uc has2,I6-to imens.

to
To Cis;THo(%)n and TAA)
TI(6:THLCS)and TA LLC8)
TH d TL ne SFR,

(tin)

CLk
O005

clock lae lclkis used to taiggn


the tmen,

G elkenycloch dse, the scot tlL


change
Jhecot nchemn
counteL

Aceasm o005 H to 6,13,lFEFFH.

You might also like