NEC 78K0S/KA1+ User Manual page 286

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

Advertisement

An example of the program that shifts the mode to self programming mode is shown below.
;----------------------------
;START
;----------------------------
MOV
MK0,#11111111B
MOV
MK1,#11111111B
DI
ModeOnLoop:
MOV
PFS,#00H
MOV
PFCMD,#0A5H
MOV
FLPMC,#01H
MOV
FLPMC,#0FEH
MOV
FLPMC,#01H
MOV
A,PFS
CMP
A,#00H
BNZ
$ModeOnLoop
;----------------------------
;END
;----------------------------
286
CHAPTER 18 FLASH MEMORY
; Masks all interrupts
; Clears flash status register
; PFCMD register control
; FLPMC register control (sets value)
; FLPMC register control (inverts set value)
; Sets self programming mode with FLPMC register
; control (sets value)
; Checks completion of write to specific registers
; Repeats the same processing when an error occurs.
User's Manual U16898EJ3V0UD

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents