English
Language : 

UPD78F9500MA-CAC-A Datasheet, PDF (257/342 Pages) Renesas Technology Corp – 8-Bit Single-Chip Microcontrollers
CHAPTER 16 FLASH MEMORY
An example of a program that performs a block blank check in self programming mode is shown below.
;----------------------------
;START
;----------------------------
FlashBlockBlankCheck:
MOV
FLCMD,#04H
MOV
FLAPH,#07H
MOV
FLAPL,#00H
MOV
FLAPHC,#07H
MOV
FLAPLC,#0FFH
; Sets flash control command (block blank check)
; Sets number of block for blank check (block 7 is specified
; here)
; Fixes FLAPL to “00H”
; Sets blank check block compare number (same value as that of
; FLAPH)
; Fixes FLAPLC to “FFH”
MOV
MOV
HALT
MOV
MOV
PFS,#00H
WDTE,#0ACH
A,PFS
CmdStatus,A
; Clears flash status register
; Clears & restarts WDT
; Self programming is started
; Execution result is stored in variable
; (CmdStatus = 0: normal termination, other than 0: abnormal
; termination)
;----------------------------
;END
;----------------------------
User’s Manual U18172EJ3V0UD
255