HD6433640 HITACHI [Hitachi Semiconductor], HD6433640 Datasheet - Page 152

no-image

HD6433640

Manufacturer Part Number
HD6433640
Description
H8/3644 Series Hardware Manual
Manufacturer
HITACHI [Hitachi Semiconductor]
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
HD6433640RA78H
Manufacturer:
HITACHI/日立
Quantity:
20 000
Part Number:
HD6433640RB90H
Manufacturer:
RENESAS/瑞萨
Quantity:
20 000
Notes: 1. In this sample program, the stack pointer (SP) is set to address H'FF80. On-chip RAM
FLMCR:
EBR1:
EBR2:
TCSRW:
TCW:
STACK:
START:
;
;
;
;
PRETST:
EBR2PW:
PWADD1:
all blocks.
Set R0 value as explained on previous page. This sample program erases
#RAMSTR is start address of RAM area to which program is transferred
Set #RAMSTR to even number
2. It is assumed that this program, written in the ROM area, is transferred to the RAM
addresses H'FF7E and H'FF7F are used as a stack area. Therefore addresses H'FF7E
and H'FF7F should not be used when this program is executed, and on-chip RAM
should not be disabled.
area and executed there. For #RAMSTR in the program, substitute the start address of
the RAM area to which the program is transferred. The value set for #RAMSTR must
be an even number.
BTST
.EQU
.EQU
.EQU
.EQU
.EQU
.EQU
.ALIGN 2
MOV.W
MOV.W
MOV.B
MOV.B
MOV.W
MOV.W
ADD.W
MOV.W
SUB.W
MOV.B
CMP.B
BEQ
CMP.B
BMI
MOV.B
SUBX
BTST
BNE
BRA
BNE
INC
MOV.W
BRA
R1L,
H'FF80
H'FF82
H'FF83
H'FFBE
H'FFBF
H'FF80
#STACK,
#H'0FFF,
R0H,
R0L,
#RAMSTR, R2
#ERVADR, R3
R3,
#START,
R3,
#H'00,
#H'0C,
ERASES
#H'08,
EBR2PW
R1L,
#H'08,
R1H,
PREWRT
PREWRT
R1L
@R2+,
PRETST
SP
R0
@EBR1
@EBR2
R2
R3
R2
R1L
R1L
R1L
R1H
R1H
R0H
PWADD1
R0L
R3
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
Set stack pointer
Select blocks to be erased (R0: EBR1/EBR2)
Set EBR1
Set EBR2
Transfer destination start address (RAM)
#RAMSTR + #ERVADR
Address of data area used in RAM
Used to test bit R1L in R0
R1L = H'0C?
If finished checking all R0 bits, branch to ERASES
If R1L
R1L – 8
Test bit R1H in EBR1 (R0H
If bit R1H in EBR1 (R0H) is 1, branch to PREWRT
If bit R1H in EBR1 (R0H) is 0, branch to PWADD1
Test bit R1L in EBR2 (R0L)
If bit R1L in EBR2 (R0L) is 1, branch to PREWRT
R1L + 1
Dummy-increment R2
8, EBR1 test; if R1L < 8, EBR2 test
R1H
R1L
)
R2
143

Related parts for HD6433640