NEC 78K0S/KB1+ User Manual page 293

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

Advertisement

An example of the program that shifts the mode to self programming mode is shown below.
;----------------------------
;START
;----------------------------
MOV
MOV
<R>
MOV
DI
<R>
ModeOnLoop:
MOV
MOV
MOV
MOV
MOV
<R>
NOP
<R>
HALT
<R>
BT
;----------------------------
;END
;----------------------------
CHAPTER 19 FLASH MEMORY
MK0,#11111111B
; Masks all interrupts
MK1,#11111111B
FLCMD,#00H
; Clear FLCMD register
; Configure settings so that the CPU clock ≥ 1 MHz
PFS,#00H
; Clears flash status register
PFCMD,#0A5H
; PFCMD register control
FLPMC,#01H
; FLPMC register control (sets value)
FLPMC,#0FEH
; FLPMC register control (inverts set value)
FLPMC,#01H
; Sets self programming mode with FLPMC register
; control (sets value)
PFS.O,$ModeOnLoop ; Checks completion of write to specific registers
; Repeats the same processing when an error occurs
User's Manual U17446EJ3V1UD
293

Advertisement

Table of Contents
loading

Table of Contents