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

UPSD3412C-24U6T 参数 Datasheet PDF下载

UPSD3412C-24U6T图片预览
型号: UPSD3412C-24U6T
PDF下载: 下载PDF文件 查看货源
内容描述: 闪存可编程系统设备与8032单片机内核和16Kbit的SRAM [Flash Programmable System Devices with 8032 Microcontroller Core and 16Kbit SRAM]
分类和应用: 闪存静态存储器微控制器
文件页数/大小: 152 页 / 1492 K
品牌: STMICROELECTRONICS [ ST ]
 浏览型号UPSD3412C-24U6T的Datasheet PDF文件第20页浏览型号UPSD3412C-24U6T的Datasheet PDF文件第21页浏览型号UPSD3412C-24U6T的Datasheet PDF文件第22页浏览型号UPSD3412C-24U6T的Datasheet PDF文件第23页浏览型号UPSD3412C-24U6T的Datasheet PDF文件第25页浏览型号UPSD3412C-24U6T的Datasheet PDF文件第26页浏览型号UPSD3412C-24U6T的Datasheet PDF文件第27页浏览型号UPSD3412C-24U6T的Datasheet PDF文件第28页  
UPSD3212C, UPSD3212CV  
Data Transfers  
Internal RAM. Table 6 shows the menu of in-  
structions that are available for moving data  
around within the internal memory spaces, and the  
addressing modes that can be used with each  
one. The MOV <dest>, <src> instruction allows  
data to be transferred between any two internal  
RAM or SFR locations without going through the  
Accumulator. Remember, the Upper 128 bytes of  
data RAM can be accessed only by indirect ad-  
dressing, and SFR space only by direct address-  
ing.  
Note: In uPSD321X Devices, the stack resides in  
on-chip RAM, and grows upwards. The PUSH in-  
struction first increments the Stack Pointer (SP),  
then copies the byte into the stack. PUSH and  
POP use only direct addressing to identify the byte  
being saved or restored, but the stack itself is ac-  
cessed by indirect addressing using the SP regis-  
ter. This means the stack can go into the Upper  
128 bytes of RAM, if they are implemented, but not  
into SFR space.  
The XCH A, <byte> instruction causes the Accu-  
mulator and ad-dressed byte to exchange data.  
The XCHD A, @Ri instruction is similar, but only  
the low nibbles are involved in the exchange. To  
see how XCH and XCHD can be used to facilitate  
data manipulations, consider first the problem of  
shifting and 8-digit BCD number two digits to the  
right. Table 8 shows how this can be done using  
XCH instructions. To aid in understanding how the  
code works, the contents of the registers that are  
holding the BCD number and the content of the  
Accumulator are shown alongside each instruction  
to indicate their status after the instruction has  
been executed.  
After the routine has been executed, the Accumu-  
lator contains the two digits that were shifted out  
on the right. Doing the routine with direct MOVs  
uses 14 code bytes. The same operation with  
XCHs uses only 9 bytes and executes almost  
twice as fast. To right-shift by an odd number of  
digits, a one-digit must be executed. Table 9  
shows a sample of code that will right-shift a BCD  
number one digit, using the XCHD instruction.  
Again, the contents of the registers holding the  
number and of the accumulator are shown along-  
side each instruction.  
The Data Transfer instructions include a 16-bit  
MOV that can be used to initialize the Data Pointer  
(DPTR) for look-up tables in Program Memory.  
Table 6. Data Transfer Instructions that Access Internal Data Memory Space  
Addressing Modes  
Mnemonic  
Operation  
Dir.  
X
Ind.  
X
Reg.  
X
Imm  
MOV A,<src>  
MOV <dest>,A  
MOV <dest>,<src>  
MOV DPTR,#data16  
PUSH <src>  
A = <src>  
X
<dest> = A  
X
X
X
<dest> = <src>  
X
X
X
X
X
DPTR = 16-bit immediate constant  
INC SP; MOV “@SP”,<src>  
MOV <dest>,”@SP”; DEC SP  
Exchange contents of A and <byte>  
Exchange low nibbles of A and @Ri  
X
X
X
POP <dest>  
XCH A,<byte>  
XCHD A,@Ri  
X
X
X
24/152  
 复制成功!