DatasheetQ Logo
Electronic component search and free download site. Transistors,MosFET ,Diode,Integrated circuits

W77E516 查看數據表(PDF) - Winbond

零件编号
产品描述 (功能)
生产厂家
W77E516
Winbond
Winbond Winbond
W77E516 Datasheet PDF : 85 Pages
First Prev 81 82 83 84 85
Preliminary W77E516
15. APPLICATION NOTE
In-system Programming Software Examples
This application note illustrates the in-system programmability of the Winbond W77E516 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 = 24 MHz
;*******************************************************************************************************************
.chip 8052
.RAMCHK OFF
.symbols
CHPCON
TA
SFRAL
SFRAH
SFRFD
SFRCN
EQU
EQU
EQU
EQU
EQU
EQU
9FH
C7H
ACH
ADH
AEH
AFH
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
ANL
CJNE
JMP
A,P1
; SCAN P1.0
A,#01H
A,#01H,PROGRAM_64K ; IF P1.0 = 0, ENTER IN-SYSTEM PROGRAMMING MODE
NORMAL_MODE
PROGRAM_64:
MOV TA,#AAH
MOV TA,#55H
MOV CHPCON,#03H
; CHPCON register is written protect by TA register.
; CHPCON = 03H, ENTER IN-SYSTEM PROGRAMMING MODE
- 81 -
Publication Release Date: August 16, 2002
Revision A1

Share Link: 

datasheetq.com  [ Privacy Policy ]Request Datasheet ] [ Contact Us ]