EasyManuals Logo

Intel MCS 51 User Manual

Intel MCS 51
334 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #36 background imageLoading...
Page #36 background image
i~.
MCS@-51PROGRAMMER’S GUIDEAND INSTRUCTION SET
INDIRECT ADDRESS AREA:
Notethat in Figure 3b the SFRSand the indirect address RAMhave the sameaddreasea(80H-OFFH).Neverthe-
less,they are two separate areas and are
amesaedin two diiferentways.
For examplethe instruction
MOV 8oH,#o&lH
writesOAAHto Port Owhichis one of the SFRSand the instruction
MOV
Rr),#80H
MOV
@RO,#OBBH
writesOBBHin location80Hofthe data RAM. Thus, after executionofboth of the aboveinstructionsPort Owill
containOAAHand location80of the MM will containOBBH.
Notethat the stack operationsareexamplesofindirectaddressing,sothe upper 128bytesofdata MM are available
as stack spacein those deviceswhichimplement256bytesof internal RAM.
DIRECT AND INDIRECT ADDRESS AREA:
The 128bytesof W whichcanbeameased
byboth directandindirectaddressingcanbedividedinto 3 segments
as listedbelowand shownin Figure4.
1. RegistarBanks O-3:
LocationsOthrough lFH (32 bytes).ASM-51and the deviceafter reset defaultto register
bank O.To use the other registerbanks the user must select them in the software(refer to the MCS-51Micro
AssemblerUser’sGuide).Each registerbank contains 8 one-byteregisters,Othrough7.
Resetinitiahzesthe StackPointerto location07Hand it is incrementedonceto start fromlocation08Hwhichisthe
first register(RO) of the secondregisterbank. Thus,in orderto usemore than oneregisterbank,the SPshouldbe
intiaked to a differentlocationof the RAM whereit is not usedfor data storage(ie, higherpart ofthe WNW).
2. Bit AddressableArex 16byteshavebeen assignedfor this segment,20H-2FH.Each one of the 128bits of this
wgmmt can be directlyaddressed(0-7FH).
Thebits can be referred
to in two waysboth of whichare acaptable by the ASM-51.One wayis to refer to their
address ie. Oto 7FH.Theotherwayis withreferenceto bytes20Hto 2FH. Thus,bits O-7 can alsobe referredto
as bits 20.0-20.7, and bits 8-FHare the same as 21.0-21.7 and so on.
Eachof the 16bytesin this segmentcan also be addressedas a byte.
3. ScratchPad Arex Bytes30Hthrough7FH are availableto the user as &ta MM. However,if the stack pointex
has beeninitializedto this arm enoughnumber of bytesshouldbe left aside to prevent5P data destruction.
2-6

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Intel MCS 51 and is the answer not in the manual?

Intel MCS 51 Specifications

General IconGeneral
BrandIntel
ModelMCS 51
CategoryMicrocontrollers
LanguageEnglish

Related product manuals