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

C8051F530-IM 参数 Datasheet PDF下载

C8051F530-IM图片预览
型号: C8051F530-IM
PDF下载: 下载PDF文件 查看货源
内容描述: 8/4/2 KB ISP功能的Flash MCU系列 [8/4/2 kB ISP Flash MCU Family]
分类和应用:
文件页数/大小: 220 页 / 2701 K
品牌: SILICON [ SILICON ]
 浏览型号C8051F530-IM的Datasheet PDF文件第104页浏览型号C8051F530-IM的Datasheet PDF文件第105页浏览型号C8051F530-IM的Datasheet PDF文件第106页浏览型号C8051F530-IM的Datasheet PDF文件第107页浏览型号C8051F530-IM的Datasheet PDF文件第109页浏览型号C8051F530-IM的Datasheet PDF文件第110页浏览型号C8051F530-IM的Datasheet PDF文件第111页浏览型号C8051F530-IM的Datasheet PDF文件第112页  
C8051F52x-53x  
13.1.2. Flash Erase Procedure  
The Flash memory can be programmed by software using the MOVX write instruction with the address and  
data byte to be programmed provided as normal operands. Before writing to Flash memory using MOVX,  
Flash write operations must be enabled by: (1) setting the PSWE Program Store Write Enable bit  
(PSCTL.0) to logic 1 (this directs the MOVX writes to target Flash memory); and (2) Writing the Flash key  
codes in sequence to the Flash Lock register (FLKEY). The PSWE bit remains set until cleared by software.  
A write to Flash memory can clear bits to logic 0 but cannot set them; only an erase operation can set bits  
to logic 1 in Flash. A byte location to be programmed should be erased before a new value is written.  
The Flash memory is organized in 512-byte pages. The erase operation applies to an entire page (setting  
all bytes in the page to 0xFF). To erase an entire 512-byte page, perform the following steps:  
Step 1. Disable interrupts (recommended).  
Step 2. Write the first key code to FLKEY: 0xA5.  
Step 3. Write the second key code to FLKEY: 0xF1.  
Step 4. Set the PSEE bit (register PSCTL).  
Step 5. Set the PSWE bit (register PSCTL).  
Step 6. Using the MOVX instruction, write a data byte to any location within the 512-byte page to  
be erased.  
Step 7. Clear the PSWE and PSEE bits.  
Step 8. Re-enable interrupts.  
13.1.3. Flash Write Procedure  
The recommended procedure for writing Flash in single bytes is:  
Step 1. Disable interrupts.  
Step 2. Write the first key code to FLKEY: 0xA5.  
Step 3. Write the second key code to FLKEY: 0xF1.  
Step 4. Set the PSWE bit (register PSCTL).  
Step 5. Clear the PSEE bit (register PSCTL).  
Step 6. Using the MOVX instruction, write a single data byte to the desired location within the 512-  
byte sector.  
Step 7. Clear the PSWE bit.  
Step 8. Re-enable interrupts.  
Steps 2–7 must be repeated for each byte to be written.  
108  
Rev. 0.3  
 复制成功!