NEC 78K0S/KB1+ User Manual page 302

8-bit single-chip microcontrollers
Hide thumbs Also See for 78K0S/KB1+:
Table of Contents

Advertisement

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
MOV
PFS,#00H
MOV
WDTE,#0ACH
HALT
MOV
A,PFS
MOV
CmdStatus,A
;----------------------------
;END
;----------------------------
302
CHAPTER 19 FLASH MEMORY
; 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"
; 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)
User's Manual U17446EJ3V1UD

Advertisement

Table of Contents
loading

Table of Contents