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

W78E516BP-24 参数 Datasheet PDF下载

W78E516BP-24图片预览
型号: W78E516BP-24
PDF下载: 下载PDF文件 查看货源
内容描述: 8位微控制器 [8-BIT MICROCONTROLLER]
分类和应用: 微控制器和处理器外围集成电路时钟
文件页数/大小: 26 页 / 223 K
品牌: WINBOND [ WINBOND ]
 浏览型号W78E516BP-24的Datasheet PDF文件第18页浏览型号W78E516BP-24的Datasheet PDF文件第19页浏览型号W78E516BP-24的Datasheet PDF文件第20页浏览型号W78E516BP-24的Datasheet PDF文件第21页浏览型号W78E516BP-24的Datasheet PDF文件第23页浏览型号W78E516BP-24的Datasheet PDF文件第24页浏览型号W78E516BP-24的Datasheet PDF文件第25页浏览型号W78E516BP-24的Datasheet PDF文件第26页  
W78E516B  
Application Note: In-system Programming Software Examples  
This application note illustrates the in-system programmability of the Winbond W78E516B MTP-ROM  
microcontroller. In this example, microcontroller will boot from 64 KB APROM bank and waiting for a  
key to enter in-system programming mode for re-programming the contents of 64 KB APROM. While  
entering in-system programming mode, microcontroller executes the loader program in 4KB LDROM  
bank. The loader program erases the 64 KB APROM then reads the new code data from external  
SRAM buffer (or through other interfaces) to update the 64KB APROM.  
EXAMPLE 1:  
;*******************************************************************************************************************  
;* Example of 64K APROM program: Program will scan the P1.0. if P1.0 = 0, enters in-system  
;* programming mode for updating the content of APROM code else executes the current ROM code.  
;* XTAL = 40 MHz  
;*******************************************************************************************************************  
.chip 8052  
.RAMCHK OFF  
.symbols  
CHPCON EQU  
CHPENR EQU  
BFH  
F6H  
C4H  
SFRAL  
SFRAH  
SFRFD  
SFRCN  
EQU  
EQU C5H  
EQU  
EQU  
C6H  
C7H  
ORG 0H  
LJMP 100H  
; JUMP TO MAIN PROGRAM  
;************************************************************************  
;* TIMER0 SERVICE VECTOR ORG = 000BH  
;************************************************************************  
ORG 00BH  
CLR  
TR0  
; TR0 = 0, STOP TIMER0  
MOV TL0,R6  
MOV TH0,R7  
RETI  
;************************************************************************  
;* 64K APROM MAIN PROGRAM  
;************************************************************************  
ORG 100H  
MAIN_64K:  
MOV A,P1  
; SCAN P1.0  
ANL A,#01H  
CJNE A,#01H,PROGRAM_64K ; IF P1.0 = 0, ENTER IN-SYSTEM PROGRAMMING MODE  
JMP NORMAL_MODE  
PROGRAM_64K:  
MOV CHPENR,#87H  
; CHPENR = 87H, CHPCON REGISTER WRTE ENABLE  
; CHPENR = 59H, CHPCON REGISTER WRITE ENABLE  
; CHPCON = 03H, ENTER IN-SYSTEM PROGRAMMING MODE  
; TR = 0 TIMER0 STOP  
MOV CHPENR,#59H  
MOV CHPCON,#03H  
MOV TCON,#00H  
MOV IP,#00H  
; IP = 00H  
MOV IE,#82H  
MOV R6,#FEH  
; TIMER0 INTERRUPT ENABLE FOR WAKE-UP FROM IDLE MODE  
; TL0 = FEH  
- 22 -  
 复制成功!