gc80c520a CORERIVER Semiconductor, gc80c520a Datasheet - Page 135

no-image

gc80c520a

Manufacturer Part Number
gc80c520a
Description
Midas1.0 Family Mask Rom/eprom/romless 8-bit Turbo Microcontrollers
Manufacturer
CORERIVER Semiconductor
Datasheet
MiDAS1.0 Family
MOVX
<dest-byte>, <src-byte>
Move External
Function:
Description:
The MOVX instructions transfer data between the Accumulator and a byte of
external data memory, hence the “X” appended to MOV. There are two types of
instructions, differing in whether they provide an eight-bit or sixteen-bit indirect
address to the external data RAM.
In the first type the contents of R0 or R1 in the current register bank provide an
eight-bit address multiplexed with data on P0. Eight bits are sufficient for
external I/O expansion decoding or for a relatively small RAM array. For
somewhat larger arrays, any output port pins can be used to output higher-order
address bits. These pins would be controlled by an output instruction preceding
the MOVX.
In the second type of MOVX instruction, the Data Pointer generates a sixteen-
bit address. P2 outputs the high-order eight address bits (the contents of DPH)
while P0 multiplexes the low-order eight bits (DPL) with data. The P2 Special
Function Register retains its previous contents while the P2 output buffers are
emitting the contents of DPH. This form is faster and more efficient when
accessing very large data arrays (up to 64Kbytes), since no additional
instructions are needed to set up the output ports.
It is possible in some situations to mix the two MOVX types. A large RAM array
with its high-order address lines driven by P2 can be addressed via the Data
Pointer, or with code to output high-order address bits to P2 followed by a
MOVX instruction using R0 or R1.
Example:
An external 256byte RAM using multiplexed address/data lines (e.g., an Intel
8155 RAM / I/O / TIMER) is connected to the 8052 Port 0. Port 3 provides
control lines for the external RAM. Ports 1 and 2 are used for normal I/O.
Registers 0 and 1 contain 12h and 34h. Location 34h of the external RAM holds
the value 56h. The instruction sequence,
MOVX A, @R1
MOVX @R0, A
copies the value 56h into both the Accumulator and external RAM location 12h.
MOVX A, @Ri
1
Bytes:
Cycles:
3
Encoding:
1
1
1
0
0
0
1
i
MOVX
Operation:
(A)
((Ri))
Page 135 of 187

Related parts for gc80c520a