English
Language : 

W78E054D Datasheet, PDF (78/89 Pages) List of Unclassifed Manufacturers – 8-bit microcontroller
W78E054D/W78E052D Data Sheet
22 APPLICATION NOTE
In-system Programming Software Examples
This application note illustrates the in-system programmability of the microcontroller. In this example,
microcontroller will boot from 2K LDROM bank enter in-system programming mode for programming
the contents of APROM, this sample to Erase APROM, Erase Verify APROM, Read one byte for
APROM, Write one byte for APROM, Read CID/DID. .
EXAMPLE: Base on Keil C51 Compiler
$nomod51
#include <reg52.h>
EAPAGE
CHPCON
SFRAL
SFRAH
SFRFD
SFRCN
DATA
DATA
DATA
DATA
DATA
DATA
0BEh
0BFh
0C4h
0C5h
0C6h
0C7h
;CPU Clock = 12MHz/12T mode
READ_TIME
EQU
1
PROGRAM_TIME
EQU
50
ERASE_TIME
EQU
5000
;For W78E(I)054D
APROM_END_ADDRESS EQU
;For W78E(I)052D
;APROM_END_ADDRESS EQU
03800h
02000h
FLASH_STANDBY
EQU
READ_CID
EQU
READ_DID
EQU
ERASE_ROM
EQU
ERASE_VERIFY
EQU
PROGRAM_ROM
EQU
PROGRAM_VERIFY_ROM EQU
READ_ROM
EQU
ORG
03800h
mov
SP,#060h
mov
TMOD,#01h
00111111B
00001011B
00001100B
00100010B
00001001B
00100001B
00001010B
00000000B
;Set Timer0 as mode1
- 78 -
Publication Release Date: Jun 9, 2015
Revision A13