
W79E201
Publication Release Date: December 16, 2004
- 81 -
Revision A2
26. APPLICATION NOTE
In-system Programming Software Examples
This application note illustrates the in-system programmability of the Winbond W79E201 Flash
EPROM microcontroller. In this example, microcontroller will boot from 16 KB
AP Flash EPROM
and
waiting for a key to enter in-system programming mode for re-programming the contents of 16 KB AP
Flash EPROM. While entering in-system programming mode, microcontroller executes the loader
program in 4KB LD Flash EPROM. The loader program erases the 16 KB AP Flash EPROM then
reads the new code data from external SRAM buffer (or through other interfaces) to update the 16KB
AP Flash EPROM.
If the customer uses the reboot mode to update his program, please enable this b3 of security bit from
the writer. Please refer security bits for detail description
EXAMPLE 1:
;*******************************************************************************************************************
;* Example of 64K AP Flash EPROM program: Program will scan the P1.0. if P1.0 = 0, enters in-system
;* programming mode for updating the content of AP Flash EPROM code else executes the current ROM code.
;* XTAL = 24 MHz
;*******************************************************************************************************************
.chip 8052
.RAMCHK OFF
.symbols
CHPCON
EQU
9FH
TA
EQU
C7H
SFRAL
EQU
ACH
SFRAH
EQU
ADH
SFRFD
EQU
AEH
SFRCN
EQU
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