W78E58B Winbond, W78E58B Datasheet - Page 27

no-image

W78E58B

Manufacturer Part Number
W78E58B
Description
8 BIT MICROCONTROLLER
Manufacturer
Winbond
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
W78E58B-24
Manufacturer:
WINBOND
Quantity:
5 530
Part Number:
W78E58B-24
Manufacturer:
WINBOND
Quantity:
5 120
Part Number:
W78E58B-24
Manufacturer:
Winbond
Quantity:
12 388
Part Number:
W78E58B-40
Manufacturer:
WINBOND
Quantity:
7 596
Part Number:
W78E58B-40
Manufacturer:
WINBOND
Quantity:
7 596
Part Number:
W78E58B-40
Quantity:
2 159
Part Number:
W78E58B-40
Manufacturer:
WINBOND/华邦
Quantity:
20 000
Part Number:
W78E58BP-40
Quantity:
2 781
Part Number:
W78E58BP-40
Manufacturer:
WINBOND/华邦
Quantity:
20 000
14. APPLICATION NOTES
In-system Programming Software Examples
This application note illustrates the in-system programmability of the Winbond W78E58B ROM
microcontroller. In this example, microcontroller will boot from 32KB APROM bank and waiting for a
key to enter in-system programming mode for re-programming the contents of 32KB APROM. While
entering in-system programming mode, microcontroller executes the loader program in 4KB LDROM
bank. The loader program erases the 32KB APROM then reads the new code data from external
SRAM buffer (or through other interfaces) to update the 32KB APROM.
EXAMPLE 1:
;*******************************************************************************************************************
;* Example of 32K 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_32K:
PROGRAM_32K:
;************************************************************************
;* TIMER0 SERVICE VECTOR ORG = 000BH
;************************************************************************
;************************************************************************
;* 32K APROM MAIN PROGRAM
;************************************************************************
ORG 100H
MOV A, P1
ANL A, #01H
CJNE A, #01H, PROGRAM_32K ; 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
00BH
0H
100H
TR0
TL0, R6
TH0, R7
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
; SCAN P1.0
- 27 -
Publication Release Date: March 18, 2002
W78E58B
Revision A3

Related parts for W78E58B