Table of Contents Previous topic Next topic
MICROPROCESSOR INSTRUCTION REFERENCE->MOVX
MOVX Move External: Move <destination byte>,<source byte>
This instruction transfers data between the accumulator and a byte of external data memory and takes two forms:
8 BIT INDIRECT ADDRESS:
The contents of R0 or R1 in the current register bank provide an 8 bit low order address whilst the contents of port 2 contain the high order address. A write to the P2 Special Function Register before the MOVX instruction therefore selects the address page that will be used.
16 BIT INDIRECT ADDRESS:
The data pointer (DPTR) generates a 16 bit address. The contents of the P2 Special Function Register are unaffected by this command.
|Move external memory to accumulator:||MOVX A,@Ri||1||2|
|Move accumulator to external memory:||MOVX @Ri,A||1||2|
|Move external memory to accumulator:||MOVX A,@DPTR||1||2|
|Move accumulator to external memory:||MOVX @DPTR,A||1||2|