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

895132-UL 参数 Datasheet PDF下载

895132-UL图片预览
型号: 895132-UL
PDF下载: 下载PDF文件 查看货源
内容描述: USB微控制器,带有64K字节Flash存储器 [USB Microcontroller with 64K Bytes Flash Memory]
分类和应用: 存储微控制器
文件页数/大小: 182 页 / 1660 K
品牌: ATMEL [ ATMEL ]
 浏览型号895132-UL的Datasheet PDF文件第22页浏览型号895132-UL的Datasheet PDF文件第23页浏览型号895132-UL的Datasheet PDF文件第24页浏览型号895132-UL的Datasheet PDF文件第25页浏览型号895132-UL的Datasheet PDF文件第27页浏览型号895132-UL的Datasheet PDF文件第28页浏览型号895132-UL的Datasheet PDF文件第29页浏览型号895132-UL的Datasheet PDF文件第30页  
8.3  
Dual Data Pointer  
8.3.1  
Description  
The AT89C5132 implement a second data pointer for speeding up code execution and reducing  
code size in case of intensive usage of external memory accesses.  
DPTR0 and DPTR1 are seen by the CPU as DPTR and are accessed using the SFR addresses  
83h and 84h that are the DPH and DPL addresses. The DPS bit in AUXR1 register (see  
Table 15) is used to select whether DPTR is the data pointer 0 or the data pointer 1 (see  
Figure 8-6).  
Figure 8-6. Dual Data Pointer Implementation  
0
1
DPL0  
DPL1  
DPL  
DPTR0  
DPTR1  
AUXR1.0  
DPTR  
DPS  
0
1
DPH0  
DPH1  
DPH  
8.3.2  
Application  
Software can take advantage of the additional data pointers to both increase speed and reduce  
code size, for example, block operations (copy, compare, search …) are well served by using  
one data pointer as a “source” pointer and the other one as a “destination” pointer.  
Below is an example of block move implementation using the two pointers and coded in assem-  
bler. The latest C compiler also takes advantage of this feature by providing enhanced algorithm  
libraries.  
The INC instruction is a short (2 Bytes) and fast (6 CPU clocks) way to manipulate the DPS bit in  
the AUXR1 register. However, note that the INC instruction does not directly forces the DPS bit  
to a particular state, but simply toggles it. In simple routines, such as the block move example,  
only the fact that DPS is toggled in the proper sequence matters, not its actual value. In other  
words, the block move routine works the same whether DPS is “0” or “1” on entry.  
; ASCII block move using dual data pointers  
; Modifies DPTR0, DPTR1, A and PSW  
; Ends when encountering NULL character  
; Note: DPS exits opposite of entry state unless an extra INC AUXR1 is added  
AUXR1  
move:  
EQU  
0A2h  
mov  
inc  
mov  
DPTR,#SOURCE  
AUXR1  
; address of SOURCE  
; switch data pointers  
; address of DEST  
DPTR,#DEST  
AUXR1  
mv_loop: inc  
movx  
; switch data pointers  
; get a byte from SOURCE  
; increment SOURCE address  
; switch data pointers  
; write the byte to DEST  
; increment DEST address  
; check for NULL terminator  
A,@DPTR  
DPTR  
inc  
inc  
movx  
inc  
jnz  
AUXR1  
@DPTR,A  
DPTR  
mv_loop  
end_move:  
26  
AT89C5132  
4173E–USB–09/07  
 复制成功!