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

W78E365A40DL 参数 Datasheet PDF下载

W78E365A40DL图片预览
型号: W78E365A40DL
PDF下载: 下载PDF文件 查看货源
内容描述: 8位微控制器 [8-BIT MICROCONTROLLER]
分类和应用: 微控制器和处理器外围集成电路光电二极管时钟
文件页数/大小: 43 页 / 420 K
品牌: WINBOND [ WINBOND ]
 浏览型号W78E365A40DL的Datasheet PDF文件第34页浏览型号W78E365A40DL的Datasheet PDF文件第35页浏览型号W78E365A40DL的Datasheet PDF文件第36页浏览型号W78E365A40DL的Datasheet PDF文件第37页浏览型号W78E365A40DL的Datasheet PDF文件第39页浏览型号W78E365A40DL的Datasheet PDF文件第40页浏览型号W78E365A40DL的Datasheet PDF文件第41页浏览型号W78E365A40DL的Datasheet PDF文件第42页  
W78E365/W78E365A  
11. APPLICATION NOTE  
11.1 In-system Programming Software Examples  
This application note illustrates the in-system programmability of the Winbond W78E365 ROM  
microcontroller. In this example, microcontroller will boot from 64KB APROM bank and waiting for a  
key to enter in-system programming mode for re-programming the contents of 64KB APROM. While  
entering in-system programming mode, microcontroller executes the loader program in 4KB LDROM  
bank. The loader program erases the 64KB 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 = 16 MHz  
;*******************************************************************************************************************  
.chip 8052  
.RAMCHK OFF  
.symbols  
CHPCON EQU  
CHPENR EQU  
BFH  
F6H  
C4H  
C5H  
C6H  
C7H  
SFRAL  
SFRAH  
SFRFD  
SFRCN  
EQU  
EQU  
EQU  
EQU  
ORG  
0H  
LJMP 100H  
; JUMP TO MAIN PROGRAM  
;************************************************************************  
;* TIMER0 SERVICE VECTOR ORG = 000BH  
;************************************************************************  
ORG 00BH  
CLR  
TR0  
; TR0 = 0, STOP TIMER0  
MOV  
MOV  
RETI  
TL0, R6  
TH0, R7  
;************************************************************************  
;* 64K APROM MAIN PROGRAM  
;************************************************************************  
ORG100H  
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  
- 38 -  
 
 复制成功!