ADE7518
Direct Addressing
With direct addressing, the value at the source address is moved
to the destination address. Direct addressing provides the fastest
execution time of all the addressing modes when an instruction
is performed between registers. Note that indirect or direct
addressing modes can be used to access general-purpose RAM
Address 0x00 through RAM Address 0x7F. An instruction with
direct addressing that uses an address between 0x80 and 0xFF is
referring to a special function memory location.
Extended Indirect Addressing
The internal extended RAM is accessed through a pointer to the
address in indirect addressing mode. The ADE7518 has 256 bytes
of internal extended RAM, accessed through MOVX instructions.
External memory is not supported on the devices.
In extended indirect addressing mode, a register holds the address
of the byte of extended RAM. The following code moves the
contents of extended RAM Address 0x80 to the accumulator:
MOV R0,#80h
Indirect Addressing
MOVX
A,@R0
With indirect addressing, the value pointed to by the register
is moved to the destination address. For example, to move the
contents of internal RAM Address 0x82 to the accumulator,
use the following instructions:
MOV R0,#82h
These two instructions require six clock cycles and three bytes
of storage.
Note that there are 256 bytes of extended RAM; therefore, both
extended direct and extended indirect addressing can cover the
whole address range. There is a storage and speed advantage to
MOV
A,@R0
using extended indirect addressing because the additional byte
These two instructions require a total of four clock cycles and
three bytes of storage in the program memory.
Indirect addressing allows addresses to be computed, which is
useful for indexing into data arrays stored in RAM.
Note that an instruction that refers to Address 0x00 through
Address 0x7F is referring to internal RAM, and indirect or
direct addressing modes can be used. An instruction with
indirect addressing that uses an address between 0x80 and
0xFF is referring to internal RAM, not to an SFR.
Extended Direct Addressing
The DPTR register (see Table 50) is used to access internal
extended RAM in extended indirect addressing mode. The
ADE7518 has 256 bytes of XRAM, accessed through MOVX
of addressing available through the DPTR register that is not
needed is not stored.
From the three examples demonstrating the access of internal
RAM from 0x80 through 0xFF, and the access of extended
internal RAM from 0x00 through 0xFF, it can be seen that it is
most efficient to use the entire internal RAM accessible through
indirect access before moving to extended RAM.
Code Indirect Addressing
The internal code memory can be accessed indirectly. This can
be useful for implementing lookup tables and other arrays of
constants that are stored in flash. For example, to move the data
stored in flash memory at Address 0x8002 into the accumulator,
use the following code:
instructions. External memory spaces are not supported on
this device.
In extended direct addressing mode, the DPTR register points
MOV
CLR
MOVX
DPTR,#8002h
A
A,@A+DPTR
to the address of the byte of extended RAM. The following code
moves the contents of extended RAM Address 0x100 to the
accumulator:
The accumulator can be used as a variable index into the array
of flash memory located at DPTR.
MOV
MOVX
DPTR,#100h
A,@DPTR
These two instructions require a total of seven clock cycles and
four bytes of storage in the program memory.
Rev. 0 | Page 68 of 128
相关PDF资料
ADE7569ASTZF16 IC ENERGY METER MCU 16K 64LQFP
ADE7752BARWZ-RL IC ENERGY METERING 3PHASE 24SOIC
ADE7755ARSZ IC ENERGY METERING 1PHASE 24SSOP
ADE7757ARNZRL IC ENERGY METERING 1PHASE 16SOIC
ADE7758ARWZRL IC ENERGY METERING 3PHASE 24SOIC
ADE7761AARSZ-RL IC ENERGY METERING 1PHASE 20SSOP
ADE7761BARSZ-RL IC ENERGY METERING 1PHASE 20SSOP
ADE7768ARZ-RL IC ENERGY METERING 1PHASE 16SOIC
相关代理商/技术参数
ADE7566 制造商:AD 制造商全称:Analog Devices 功能描述:Single-Phase Energy Measurement IC with 8052 MCU, RTC, and LCD Driver
ADE7566ACPZF16 制造商:AD 制造商全称:Analog Devices 功能描述:Single-Phase Energy Measurement IC with 8052 MCU, RTC, and LCD Driver
ADE7566ACPZF161 制造商:AD 制造商全称:Analog Devices 功能描述:Single-Phase Energy Measurement IC with 8052 MCU, RTC and LCD driver
ADE7566ACPZF162 制造商:AD 制造商全称:Analog Devices 功能描述:Single-Phase Energy Measurement IC with 8052 MCU, RTC, and LCD Driver
ADE7566ACPZF16-RL 制造商:AD 制造商全称:Analog Devices 功能描述:Single-Phase Energy Measurement IC with 8052 MCU, RTC, and LCD Driver
ADE7566ACPZF16-RL1 制造商:AD 制造商全称:Analog Devices 功能描述:Single-Phase Energy Measurement IC with 8052 MCU, RTC and LCD driver
ADE7566ACPZF16-RL12 制造商:AD 制造商全称:Analog Devices 功能描述:Single-Phase Energy Measurement IC with 8052 MCU, RTC, and LCD Driver
ADE7566ACPZF8 制造商:AD 制造商全称:Analog Devices 功能描述:Single-Phase Energy Measurement IC with 8052 MCU, RTC, and LCD Driver