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 #88 background imageLoading...
Page #88 background image
int&
MCS@-51PROGRAMMER’SGUIDE AND INSTRUCTION SET
MOVX <dest-byte>, <sin-byte>
Function: Move External
Deaoription: The MOVX
instructionstransfer data betweenthe Accumulatorand a byteof exa data
memory,hencethe “X” appendedto MOV.There are two typesof instructions,differingin
whetherthey providean eight-bitor sixteen-bitindirect addressto the externrddata RAM.
In the first typq the contents of ROor R] in the current registerbank providean eight-bit
address multiplexedwith data on PO.Eight bits are sufficientfor external 1/0 expansion
decodingor for a relativelysmall RAM array. For somewhatlarger arrays,any output port
pins can be used to output higher-orderaddress bits. These pins wouldbe controlledby an
outputinstructionprecedingthe MOVX.
In the secondtype of MOVXinstruction,the Data Pointer generatesa sixteen-bitaddress.P2
outputsthehigh-ordereight addressbits(the contentsof DPH) whilePOmultiplexesthe low-
order eightbits (DPL) with data. The P2 SpecialFunctionRegisterretains its previouscon-
tents whilethe P2 ouQut buffersare emittingthe contents of DPH. This form is faster and
more efticientwhen accessingverylarge data arrays (up to 64K bytes),sinceno additional
instructionsare neededto set up the output ports.
It is possiblein somesituations to mix the two MOVX types.A largeR4M array with its
high~rder addresslinesdrivenby P2 can be addressedvia the Data Pointer,or with codeto
outputhigh-orderaddressbits to P2 followedby a MOVXinstructionusingROor RI.
Example:
An external256 byte RAM using
multiplexedaddress/&talines(e.g.,anMel 8155UM/
I/Oflimer) is connectedto the 8051Port O.Port 3 providescontrol linesfor the external
W. Ports 1 and 2 are used for normal 1/0. Registers Oand 1 contain 12H and 34H.
Location34Hof the extemsJRAM holdsthe value 56H.The instructionsequence,
MOVX A@Rl
MOVX @RO,A
copiesthe value56H into boththe Accumulatorand external RAM location12H.
2-58

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