English
Language : 

HD64F3437TF16 Datasheet, PDF (497/752 Pages) Hitachi Semiconductor – 12 V must not be applied to the S-mask model (single-power-supply specification), as this may permanently damage the device.
Notes: 1. In this sample program, the stack pointer (SP) is set at address FF80. As the stack area,
on-chip RAM addresses FF7E and FF7F are used. Therefore, when executing this
sample program, addresses FF7E and FF7F should not be used. In addition, the on-chip
RAM should not be disabled.
2. In this sample program, the program written in a ROM area (including external space)
is transferred into the RAM area and executed in the RAM to which the program is
transferred. #RAMSTR in the program is the starting destination address in RAM to
which the program is transferred. #RAMSTR must be set to an even number.
3. When executing this sample program in the on-chip ROM area or external space,
#RAMSTR should be set to #START.
FLMCR:
EBR1:
EBR2:
TCSR:
STACK:
.RQU
.EQU
.EQU
.EQU
.EQU
H'FF80
H'FF82
H'FF83
H'FFA8
H'FF80
.ALIGN 2
START: MOV.W
#STACK, SP
; Set stack pointer
; Set the bits in R0 following the description on the previous page. This program is a sample program to erase
; all blocks.
MOV.W
#H'FFFF, R0
; Select blocks to be erased (R0: EBR1/EBR2)
MOV.W
R0,
@EBR1 ; Set EBR1/EBR2
; #RAMSTR is starting destination address to which program is transferred in RAM.
; Set #RAMSTR to even number.
MOV.W
#RAMSTR, R2
; Starting transfer destination address (RAM)
MOV.W
#ERVADR, R3
;
ADD.W
R3,
R2
; #RAMSTR + #ERVADR → R2
MOV.W
#START, R3
;
SUB.W
R3,
R2
; Address of data area used in RAM
PRETST:
EBR2PW:
PWADD1:
MOV.B
CMP.B
BEQ
CMP.B
BMI
MOV.B
SUBX
BTST
BNE
BRA
BTST
BNE
INC
MOV.W
BRA
#H'00, R1L
#H'10, R1L
ERASES
#H'08, R1L
EBR2PW
R1L,
R1H
#H'08, R1H
R1H,
R0H
PREWRT
PWADD1
R1L,
R0L
PREWRT
R1L
@R2+,
R3
PRETST
: Used to test R1L bit in R0
; R1L = H'10?
; If finished checking all R0 bits, branch to ERASES
;
; Test EBR1 if R1L ≥ 8, or EBR2 if R1L < 8
;
; R1L – 8 → R1H
; Test R1H bit in EBR1 (R0H)
; If R1H bit in EBR1 (R0H) is 1, branch to PREWRT
; If R1H bit in EBR1 (R0H) is 0, branch to PWADD1
; Test R1L bit in EBR2 (R0L)
; If R1L bit in EBR2 (R0H) is 1, branch to PREWRT
; R1L + 1 → R1L
; Dummy-increment R2
;
468