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

MPC82G516AD 参数 Datasheet PDF下载

MPC82G516AD图片预览
型号: MPC82G516AD
PDF下载: 下载PDF文件 查看货源
内容描述: 8位微控制器 [8-bit microcontroller]
分类和应用: 微控制器
文件页数/大小: 144 页 / 1527 K
品牌: MEGAWIN [ MEGAWIN TECHNOLOGY CO., LTD ]
 浏览型号MPC82G516AD的Datasheet PDF文件第103页浏览型号MPC82G516AD的Datasheet PDF文件第104页浏览型号MPC82G516AD的Datasheet PDF文件第105页浏览型号MPC82G516AD的Datasheet PDF文件第106页浏览型号MPC82G516AD的Datasheet PDF文件第108页浏览型号MPC82G516AD的Datasheet PDF文件第109页浏览型号MPC82G516AD的Datasheet PDF文件第110页浏览型号MPC82G516AD的Datasheet PDF文件第111页  
20.3 IAP Operation  
The way to program the IAP-memory is called the ‘In-Application Programming’ (IAP), which is all the same as  
the ISP except the following differences:  
(1) The IAP can only program the IAP-memory while the ISP can program both the AP-memory and IAP-memory.  
(2) The program code to execute IAP is located in the AP-memory while the program code to execute ISP is  
located in the ISP-memory.  
All the ISP modes (see Section 20.2.2) can also be applied to the IAP operation. Prior to using the IAP function,  
there must exist an IAP-memory. For the MPC82G516A, the user can configure an IAP-memory by a Universal  
Programmer, the “Megawin 8051 Writer” or the “Megawin 8051 ICP Programmer” (see Section 20.4.1).  
20.3.1 Update the Data in the IAP-memory  
Because the Flash can only perform page erasing, and only the 0xFF byte can be programmed into a non-0xFF  
byte. So, if some bytes (in the same page) to be changed are not 0xFF, the user should comply with the following  
steps:  
Step1) Read all the data in that page and save them in a page_buffer.  
Step2) Erase that page.  
Step3) Update the wanted bytes in the page_buffer.  
Step4) Re-program that page with all the data out of the updated page_buffer.  
Here the user might question: Where is the page_buffer? The page_buffer may exist in the traditional 256 bytes  
of scratchpad RAM or the on-chip eXpanded RAM (i.e., XRAM, accessed by the ‘MOVX’ instruction).  
Normally, the page_buffer size should be equal to the Flash page size (i.e., 512 bytes). However, sometimes it is  
impossible to meet it due to the limited available space of RAM or XRAM. Here is an example that shows how to  
solve it. Suppose 280 bytes of non-volatile storage are wanted, but only 128 bytes of RAM are available for the  
page_buffer. In this case, we may use 3 pages to offer the 280 bytes of non-volatile storage: the 1st page offers  
128 bytes, the 2nd page offers 128 bytes and the 3rd page offers 24 bytes, as shown in the Figure 20-10. Note  
that we have no choice but to take this usage!  
Figure 20-10. Usage of IAP-memory when the page buffer is less than 512 bytes  
Only 128 bytes used  
Only 128 bytes used  
Only 24 bytes used  
IAP lower boundary  
The 1st page,  
512 bytes  
Total 280 bytes  
The 2nd page,  
512 bytes  
IAP-memory  
The 3rd page,  
512 bytes  
.
.
.
107  
MPC82G516A Data Sheet  
MEGAWIN  
 
 复制成功!