w78e516b Winbond Electronics Corp America, w78e516b Datasheet - Page 32

no-image

w78e516b

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

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
w78e516b-24
Quantity:
5 530
Part Number:
w78e516b-24
Manufacturer:
WINBOND
Quantity:
5 120
Part Number:
w78e516b-24
Manufacturer:
SAM
Quantity:
2 000
Part Number:
w78e516b-24
Manufacturer:
WINBOND/华邦
Quantity:
20 000
Part Number:
w78e516b-40
Manufacturer:
WINBOND
Quantity:
4 130
Part Number:
w78e516b-40
Manufacturer:
WINBOND
Quantity:
4 130
Part Number:
w78e516b-40
Manufacturer:
WINBOND/华邦
Quantity:
20 000
Part Number:
w78e516b40
Manufacturer:
WINBOND/华邦
Quantity:
20 000
Part Number:
w78e516b40DL
Manufacturer:
WINBOND/华邦
Quantity:
20 000
Part Number:
w78e516b40FL
Manufacturer:
Nuvoton Technology Corporation of America
Quantity:
10 000
Part Number:
w78e516b40PL
Manufacturer:
Nuvoton Technology Corporation of America
Quantity:
10 000
Part Number:
w78e516b40PL
Manufacturer:
WINBOND/华邦
Quantity:
20 000
11. APPLICATION NOTE
11.1 In-system Programming Software Examples
This application note illustrates the in-system programmability of the Winbond W78E516B Flash
EPROM 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
;*******************************************************************************************************************
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
MOV TCON, #00H
00BH
0H
TL0, R6
TH0, R7
100H
TR0
EQU
EQU
EQU
EQU
EQU
EQU
C5H
BFH
F6H
C4H
C6H
C7H
; JUMP TO MAIN PROGRAM
; TR0 = 0, STOP TIMER0
; CHPENR = 87H, CHPCON REGISTER WRTE ENABLE
; CHPENR = 59H, CHPCON REGISTER WRITE ENABLE
; CHPCON = 03H, ENTER IN-SYSTEM PROGRAMMING MODE
; TR = 0 TIMER0 STOP
; SCAN P1.0
- 32 -
Publication Release Date: April 22, 2008
W78E516B
Revision A12

Related parts for w78e516b