Hitachi H8/3048 Hardware Manual page 612

Single-chip microcomputer
Table of Contents

Advertisement

LOOPR1: DEC.W
BPL
www.DataSheet4U.com
MOV.B
MOV.W
MOV.W
MOV.W
LOOPR2: DEC.W
BPL
MOV.B
BEQ
PWVFNG: CMP.B
BEQ
INC.B
SHLL.W
BRA
PWVFOK: INC.L
CMP.L
BEQ
BRA
PWADD2: INC.B
BRA
Execute erase
;
ERASES: MOV.W
SUB.W
MOV.W
ERASE:
MOV.W
MOV.W
MOV.W
MOV.W
MOV.B
LOOPE:
PUSH.L
POP.L
PUSH.L
POP.L
PUSH.L
POP.L
DEC.W
BPL
MOV.B
MOV.W
MOV.W
#1,
E1
LOOPR1
R5L,
@FLMCR:8 ;
#A500,
R5
R5,
@TCSR:16 ;
#c,
R5
#1,
R5
LOOPR2
@ER3,
R5H
PWVFOK
#06,
R1H
ABEND1
R1H
E0
PREWRS
#1,
ER3
ER4,
ER3
PWADD2
PREW
R1L
PRETST
R6,
@EBR1:16 ;
E6,
E6
#d,
E0
#f ,
R5
R5,
@TCSR:16 ;
E0,
E1
#4240,
R5
R5H,
@FLMCR:8 ;
ER5
ER5
ER5
ER5
ER5
ER5
#1,
E1
LOOPE
R5L,
@FLMCR:8 ;
#A500,
R5
R5,
@TCSR:16 ;
603
Program
;
;
Clear P bit
;
Stop watchdog timer
Prewrite-verify loop counter
;
;
;
;
Read data = #'00?
If read data = #'00, branch to PWVFOK
;
;
Prewrite-verify executed 6 times?
If prewrite-verify executed 6 times, branch to ABEND1
;
Prewrite-verify fail count + 1 → R1H
;
;
Double prewrite loop counter value
Prewrite again
;
Address + 1 → ER3
;
;
Last address?
;
;
Used to test (R1L + 1)–th bit in R0
;
;
Branch to PRETST
Set EBR1/EBR2
;
E6: erase-verify fail count
;
Set initial erase loop counter value
;
Start watchdog timer
Set erase-loop counter
;
;
Set E bit
;
Erase
Clear E bit
;
Stop watchdog timer

Advertisement

Table of Contents
loading

Table of Contents