欢迎访问ic37.com |
会员登录 免费注册
发布采购

C8051F502-IM 参数 Datasheet PDF下载

C8051F502-IM图片预览
型号: C8051F502-IM
PDF下载: 下载PDF文件 查看货源
内容描述: 混合信号ISP功能的Flash MCU系列 [Mixed Signal ISP Flash MCU Family]
分类和应用: 微控制器和处理器外围集成电路PC时钟
文件页数/大小: 312 页 / 2813 K
品牌: SILICON [ SILICON ]
 浏览型号C8051F502-IM的Datasheet PDF文件第143页浏览型号C8051F502-IM的Datasheet PDF文件第144页浏览型号C8051F502-IM的Datasheet PDF文件第145页浏览型号C8051F502-IM的Datasheet PDF文件第146页浏览型号C8051F502-IM的Datasheet PDF文件第148页浏览型号C8051F502-IM的Datasheet PDF文件第149页浏览型号C8051F502-IM的Datasheet PDF文件第150页浏览型号C8051F502-IM的Datasheet PDF文件第151页  
C8051F50x-F51x  
18. External Data Memory Interface and On-Chip XRAM  
For C8051F50x-F51x devices, 4 kB of RAM are included on-chip and mapped into the external data mem-  
ory space (XRAM). Additionally, an External Memory Interface (EMIF) is available on the C8051F500/1/4/5  
and C8051F508/9-F510/1 devices, which can be used to access off-chip data memories and memory-  
mapped devices connected to the GPIO ports. The external memory space may be accessed using the  
external move instruction (MOVX) and the data pointer (DPTR), or using the MOVX indirect addressing  
mode using R0 or R1. If the MOVX instruction is used with an 8-bit address operand (such as @R1), then  
the high byte of the 16-bit address is provided by the External Memory Interface Control Register  
(EMI0CN, shown in SFR Definition 18.1).  
Note: The MOVX instruction can also be used for writing to the Flash memory. See Section “15. Flash Memory” on  
page 129 for details. The MOVX instruction accesses XRAM by default.  
18.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 16-bit  
register which contains the effective address of the XRAM location to be read from or written to. The sec-  
ond method uses R0 or R1 in combination with the EMI0CN register to generate the effective XRAM  
address. Examples of both of these methods are given below.  
18.1.1. 16-Bit MOVX Example  
The 16-bit form of the MOVX instruction accesses the memory location pointed to by the contents of the  
DPTR register. The following series of instructions reads the value of the byte at address 0x1234 into the  
accumulator A:  
MOV  
MOVX  
DPTR, #1234h  
A, @DPTR  
; load DPTR with 16-bit address to read (0x1234)  
; load contents of 0x1234 into accumulator A  
The above example uses the 16-bit immediate MOV instruction to set the contents of DPTR. Alternately,  
the DPTR can be accessed through the SFR registers DPH, which contains the upper 8-bits of DPTR, and  
DPL, which contains the lower 8-bits of DPTR.  
18.1.2. 8-Bit MOVX Example  
The 8-bit form of the MOVX instruction uses the contents of the EMI0CN SFR to determine the upper 8-bits  
of the effective address to be accessed and the contents of R0 or R1 to determine the lower 8-bits of the  
effective address to be accessed. The following series of instructions read the contents of the byte at  
address 0x1234 into the accumulator A.  
MOV  
MOV  
MOVX  
EMI0CN, #12h  
R0, #34h  
a, @R0  
; load high byte of address into EMI0CN  
; load low byte of address into R0 (or R1)  
; load contents of 0x1234 into accumulator A  
Rev. 1.1  
147  
 复制成功!