Fujitsu MB90420/5 (A) Series Hardware Manual page 539

F2mc-16lx family 16-bit microcontrollers
Table of Contents

Advertisement

MB90420/5 (A) SERIES F
WAIT2
BBC
;
;/////////////////////////////////////////////
; Sector erasing (SA0)
;/////////////////////////////////////////////
MOV
MOV
MOVW
MOVW
MOVW
MOVW
MOVW
MOV
ELS
; Waiting check
;
/////////////////////////////////////////////////////
ERROR occurs when time limit exceeding check flag is set and toggling is underway.
;
;
/////////////////////////////////////////////////////
MOVW
AND
BZ
MOVW
MOVW
XORW
AND
BNZ
;
///////////////////////////////////////
;
Erasing end check (FMCS-RDY)
;
///////////////////////////////////////
NTOE
MOVW
AND
BZ
MOV
RETP
;//////////////////////////////////////////////
;Error
;//////////////////////////////////////////////
ERROR
MOV
MOV
MOV
RETP
RAMPRG
ENDS
;/////////////////////////////////////////////
VECT
CSEG
ORG
DSL
DB
VECT
ENDS
;
END
2
MC-16LX FAMILY 16-BIT MICROCONTROLLERS HARDWARE MANUAL
PDR3:1, WAIT2
@RW2+00, #0000
H
FMCS, #20
H
ADB:COMADR1, #00AA
ADB:COMADR2, #0055
ADB:COMADR1, #0080
ADB:COMADR1, #00AA
ADB:COMADR2, #0055
@RW2+00, #0030
H
A, @RW2+00
A, #20
H
NTOE
A, @RW2+00
A, @RW2+00
A
A, #40
H
ERROR
A, FMCS
A, #10
H
ELS
FMCS, #00
H
FMCS, #00
H
PDR0, #0FF
H
ADB:COMADR1, #0F0
ABS = 0FF
H
0FFDC
H
START
00
H
START
; PDR3:1 With High, start sector erasing.
; Initialize address.
; Set erase mode.
; Erase command 1
H
; Erase command 2
H
; Erase command 3
H
; Erase command 4
H
; Erase command 5
H
; Issue Erase command to sector to be erased 6.
; DQ5 time limit check
; Time limit over
; AH During programming, from DQ6 are alternately
; AL output High and Low level every reading.
; XOR of AH and AL (1 if DQ6 value invalid,
indicating programming underway)
; Is DQ6 toggle bit High?
; If yes, go to ERROR.
;
; Extract RDY bit (4 bits) of FMCS.
; Is erasing terminated?
; Cancel flash erase mode.
; Return to main program.
; Cancel flash mode.
; Check error processing.
; Reset command (enabling read)
H
; Return to main program.
25-26

Advertisement

Table of Contents
loading

Table of Contents