82
3886 Group
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
MITSUBISHI MICROCOMPUTERS
G
CPU reprogramming mode operation procedure
The operation procedure in CPU reprogramming mode is de-
scribed below.
< Beginning procedure >
Apply 0 V to the CNVss/V
PP
pin for reset release.
After CPU reprogramming mode control program is transferred to
internal RAM, jump to this control program on RAM. (The follow-
ing operations are controlled by this control program).
Set “1" to the CPU reprogramming mode select bit.
Apply V
PP
H to the CNV
SS
/V
PP
pin.
Wait till CNV
SS
/V
PP
pin becomes 12 V.
Read the CPU reprogramming mode monitor flag to confirm
whether the CPU reprogramming mode is valid.
The operation of the flash memory is executed by software-com-
mand-writing to the flash command register .
Note:
The following are necessary other than this:
Control for data which is input from the external (serial I/O
etc.) and to be programmed to the flash memory
Initial setting for ports etc.
Writing to the watchdog timer
< Release procedure >
Apply 0V to the CNV
SS
/V
PP
pin.
Wait till CNV
SS
/V
PP
pin becomes 0V.
Set the CPU reprogramming mode select bit to “0.”
Each software command is explained as follows.
G
Read command
When “00
16
" is written to the flash command register, the
M38869FFAHP/GP enters the read mode. The contents of the
corresponding address can be read by reading the flash memory
(For instance, with the LDA instruction etc.) under this condition.
The read mode is maintained until another command code is written
to the flash command register. Accordingly, after setting the read
mode once, the contents of the flash memory can continuously be
read.
After reset and after the reset command is executed, the read
mode is set.
Fig. 80 Flash command register bit configuration
Fig. 81 CPU mode register bit configuration in CPU rewriting
mode
Writing of software command
<Command code>
“00
16
”
“40
16
”
“C0
16
”
“20
16
” + “20
16
”
“A0
16
”
“FF
16
” + “FF
16
”
<Software command name>
Read command
Program command
Program verify command
Erase command
Erase verify command
Reset command
Note:
The flash command register is write-only register.
Flash command register
(FCMD : address 0FFF
16
)
7
6
5
4
3
2
1
0
C
(
C
P
U
P
m
M
r
o
d
:
e
a
d
r
e
d
g
r
e
i
s
s
t
e
0
r
U
0
3
B
1
6
)
b
7
b
0
0
S
t
a
0
1
c
k
p
0
1
a
g
p
p
e
a
a
s
e
e
e
l
e
c
t
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