English
Language : 

W79E225A_08 Datasheet, PDF (197/203 Pages) Winbond – 8-bit Microcontroller
Preliminary W79E225A/226A/227A Data Sheet
27. APPLICATION NOTE
In-system Programming Software Examples
This application note illustrates the in-system programmability of the Winbond W79E22X SERIES
Flash EPROM microcontroller. In this example, microcontroller will boot from "1'MBTI bank and waiting
for a key to enter in-system programming mode for re-programming the contents of 64 KB APFlash.
While entering in-system programming mode, microcontroller executes the loader program in 4KB
LDFlash bank. The loader program erases the 64 KB APFlash then reads the new code data from
external SRAM buffer (or through other interfaces) to update the APFlash.
If the customer uses the reboot mode to update his program, please enable this b3 or b4 of security
bits from the writer. Please refer security bits for detail description.
EXAMPLE 1:
;*******************************************************************************************************************
;* Example of APFlash program: Program will scan the P1.0. If P1.0 = 0, enters in-system
;* programming mode for updating the content of APFlash code else executes the current ROM code.
;* XTAL = 24 MHz
;*******************************************************************************************************************
.chip 8052
.RAMCHK OFF
.symbols
CHPCON
TA
SFRAL
SFRAH
SFRFD
SFRCN
EQU
EQU
EQU
EQU
EQU
EQU
9FH
C7H
ACH
ADH
AEH
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
;************************************************************************
;* APFlash MAIN PROGRAM
;************************************************************************
ORG 100H
- 197 -
Publication Release Date: April 15, 2008
Revision A4.0