C8051F340/1/2/3/4/5/6/7
13. External Data Memory Interface and On-Chip XRAM
4k Bytes (C8051F340/2/4/6) or 2k Bytes (C8051F341/3/5/7) of RAM are included
13.1. Accessing XRAM
The XRAM memory space is accessed using the MOVX instruction. The MOVX instruction has two forms, both of which use an indirect addressing method. The first method uses the Data Pointer, DPTR, a
13.1.1. 16-Bit MOVX Example
The
MOV | DPTR, #1234h | ; | load | DPTR with |
MOVX | A, @DPTR | ; | load | contents of 0x1234 into accumulator A |
The above example uses the
13.1.2.
The
MOV | EMI0CN, #12h | ; load | high byte of address into EMI0CN | |||
MOV | R0, #34h | ; | load | low byte | of | address into R0 (or R1) |
MOVX | a, @R0 | ; | load | contents | of | 0x1234 into accumulator A |
Rev. 0.5 | 117 |