English
Language : 

HD64F3437TF16 Datasheet, PDF (488/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.
Sample Program for Programming One Byte: This program uses the following registers.
R0H: Specifies blocks to be erased.
R1H: Stores data to be programmed.
R1L: Stores data to be read.
R3: Stores address to be programmed. Valid address specifications are H'0000 to H'EF7F in
mode 2, and H'0000 to H'F77F in mode 3.
R4: Sets program and program-verify timing loop counters, and also stores register setting
value.
R5: Sets program timing loop counter.
R6L: Used for program-verify fail count.
Arbitrary data can be programmed at an arbitrary address by setting the address in R3 and the data
in R1H.
The setting of #a and #b values depends on the clock frequency. Set #a and #b values according to
tables 20.9 (1) and (2).
FLMCR:
EBR1:
EBR2:
TCSR:
.EQU
.EQU
.EQU
.EQU
H'FF80
H'FF82
H'FF83
H'FFA8
PRGM:
.ALIGN
MOV.B
MOV.B
2
#H'**,
R0H,
R0H
@EBR*:8
;
; Set EBR*
PRGMS:
LOOP1:
MOV.B
MOV.W
MOV.B
INC
MOV.W
MOV.W
MOV.W
BSET
SUBS
MOV.W
BNE
BCLR
MOV.W
MOV.W
#H'00, R6L
#H'a, R5
R1H,
@R3
R6L
#H'A579, R4
R4,
@TCSR
R5,
R4
#0,
@FLMCR:8
#1,
R4
R4,
R4
LOOP1
#0,
@FLMCR:8
#H'A500, R4
R4,
@TCSR
; Program-verify fail counter
; Set program loop counter
; Dummy write
; Program-verify fail counter + 1 → R6L
;
; Start watchdog timer
; Set program loop counter
; Set P bit
;
;
; Wait loop
; Clear P bit
;
; Stop watchdog timer
LOOP2:
MOV.B
BSET
DEC
BNE
MOV.B
CMP.B
BEQ
BCLR
#H'b ,
#2,
R4H
LOOP2
@R3,
R1H,
PVOK
#2,
R4H
@FLMCR:8
R1L
R1L
@FLMCR:8
; Set program-verify loop counter
; Set PV bit
;
; Wait loop
; Read programmed address
; Compare programmed data with read data
; Program-verify decision
; Clear PV bit
459