w78l365a Winbond Electronics Corp America, w78l365a Datasheet - Page 37

no-image

w78l365a

Manufacturer Part Number
w78l365a
Description
8-bit Microcontroller
Manufacturer
Winbond Electronics Corp America
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
w78l365a24DL
Manufacturer:
WINBOND/华邦
Quantity:
20 000
Part Number:
w78l365a24FL
Manufacturer:
Nuvoton Technology Corporation of America
Quantity:
10 000
Part Number:
w78l365a24PL
Manufacturer:
Nuvoton Technology Corporation of America
Quantity:
10 000
Part Number:
w78l365a24PL
Manufacturer:
WINBOND/华邦
Quantity:
20 000
11. APPLICATION NOTE
11.1
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
;*******************************************************************************************************************
MAIN_64K:
PROGRAM_64K:
;************************************************************************
;* TIMER0 SERVICE VECTOR ORG = 000BH
;************************************************************************
;************************************************************************
;* 64K APROM MAIN PROGRAM
;************************************************************************
ORG 100H
MOV A, P1
ANL A, #01H
CJNE A, #01H, PROGRAM_64K ; IF P1.0 = 0, ENTER IN-SYSTEM PROGRAMMING MODE
JMP NORMAL_MODE
.chip 8052
.RAMCHK OFF
.symbols
CHPCON
CHPENR
SFRAL
SFRAH
SFRFD
SFRCN
ORG
LJMP
ORG
CLR
MOV
MOV
RETI
MOV CHPENR, #87H
MOV CHPENR, #59H
MOV CHPCON, #03H
In-system Programming Software Examples
00BH
0H
100H
TL0, R6
TH0, R7
TR0
EQU
EQU
EQU
EQU
EQU
EQU
C5H
BFH
F6H
C4H
C6H
C7H
; JUMP TO MAIN PROGRAM
; TR0 = 0, STOP TIMER0
; SCAN P1.0
; CHPENR = 87H, CHPCON REGISTER WRTE ENABLE
; CHPENR = 59H, CHPCON REGISTER WRITE ENABLE
; CHPCON = 03H, ENTER IN-SYSTEM PROGRAMMING MODE
- 37 -
W78LE365/W78L365A
Publication Release Date: April 28, 2008
Revision A8

Related parts for w78l365a