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

MPC82G516AD 参数 Datasheet PDF下载

MPC82G516AD图片预览
型号: MPC82G516AD
PDF下载: 下载PDF文件 查看货源
内容描述: 8位微控制器 [8-bit microcontroller]
分类和应用: 微控制器
文件页数/大小: 144 页 / 1527 K
品牌: MEGAWIN [ MEGAWIN TECHNOLOGY CO., LTD ]
 浏览型号MPC82G516AD的Datasheet PDF文件第98页浏览型号MPC82G516AD的Datasheet PDF文件第99页浏览型号MPC82G516AD的Datasheet PDF文件第100页浏览型号MPC82G516AD的Datasheet PDF文件第101页浏览型号MPC82G516AD的Datasheet PDF文件第103页浏览型号MPC82G516AD的Datasheet PDF文件第104页浏览型号MPC82G516AD的Datasheet PDF文件第105页浏览型号MPC82G516AD的Datasheet PDF文件第106页  
20.2.3 How to Implement In-System Programming  
Before using the ISP function, the user should use a Universal Programmer, the “Megawin 8051 Writer” or the  
“Megawin 8051 ICP Programmer” (see Section 20.4.1) to do the following configuration:  
(1) Properly configure an ISP-memory according to size of the ‘loader program’.  
(2) Program the ‘loader program’ (hereafter called ‘ISP code’) into this configured ISP-memory.  
As we have known, the purpose of the ISP code is to program both AP-memory and IAP-memory. Therefore, the  
MCU must boot from the ISP-memory in order to execute the ISP code. There are two methods to implement  
In-System Programming according to how the MCU boots from the ISP-memory.  
Method 1: MCU Directly Boots from ISP-memory at Power-up  
To make the MCU directly boot from the ISP-memory when it is just powered on, the MCU’s hardware option  
HWBS or HWBS2 must be enabled. Once HWBS or HWBS2 is enabled, the MCU will always boot from the ISP-  
memory to execute the ISP code when it is just powered on. The first thing the ISP code should do is to check if  
there is an ISP request. If there is no ISP requested, the ISP code should trigger a software reset to make the  
MCU re-boot from the AP-memory to run the user’s application program. See the following flow chart.  
Figure 20-5. Directly boot from ISP-memory (HWBS or HWBS2 is enabled)  
Power on, or  
Reset from RST-pin  
"Reset from RST-pin" is  
only for enabled HWBS2.  
MCU boots from ISP-memory,  
and starts to run the "ISP code".  
NO  
Check if ISP is requested?  
YES  
See Figure 20-2  
for the flow chart  
ISPCR=ISPCR&0xBF;  
Do Flash Page Erase  
Do Flash Program  
//SWBS=0,  
//select software-boot from AP-memory  
ISPCR=ISPCR|0x20;  
//SWRST=1,  
//trigger software reset to reboot from AP-memory  
See Figure 20-3  
for the flow chart  
See Figure 20-4  
for the flow chart  
Do Flash Read to verify  
the programmed data  
MCU will re-boot from AP-memory,  
and run the normal "Application code"  
End  
MEGAWIN  
MPC82G516A Data Sheet  
102  
 
 复制成功!