w78le58 Winbond Electronics Corp America, w78le58 Datasheet - Page 27

no-image

w78le58

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

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
w78le58F-24
Manufacturer:
WINBOND
Quantity:
664
Part Number:
w78le58P-24
Quantity:
20
Application Note: In-system Programming Software Examples
This application note illustrates the in-system programmability of the Winbond W78LE58 MTP-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 TCON,#00H
MOV CHPENR,#59H
MOV CHPCON,#03H
MOV IP,#00H
MOV CHPENR,#87H
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
; SCAN P1.0
; CHPENR = 87H, CHPCON REGISTER WRTE ENABLE
; CHPENR = 59H, CHPCON REGISTER WRITE ENABLE
; CHPCON = 03H, ENTER IN-SYSTEM PROGRAMMING MODE
; TR = 0 TIMER0 STOP
; IP = 00H
- 27 -
Preliminary W78LE58
Publication Release Date: June 2000
Revision A1

Related parts for w78le58