English
Language : 

TMP86FH46BNG Datasheet, PDF (167/216 Pages) Toshiba Semiconductor – 8 Bit Microcontroller TLCS-870/C Series
TMP86FH46BNG
Example :After sector erasure (E000H-EFFFH), the program in the RAM area writes data 3FH to address E000H.
DI
LD
(WDTCR2),4EH
LDW
(WDTCR1),0B101H
LD
(FLSCR),00111000B
LD
IX,0F555H
LD
IY,0FAAAH
LD
HL,0E000H
; #### Flash Memory Sector Erase Process ####
LD
(IX),0AAH
LD
(IY),55H
LD
(IX),80H
LD
(IX),0AAH
LD
(IY),55H
LD
(HL),30H
sLOOP1:
LD
W,(HL)
CMP
W,(HL)
JR
NZ,sLOOP1
; #### Flash Memory Write Process ####
LD
(IX),0AAH
LD
(IY),55H
LD
(IX),0A0H
LD
(HL),3FH
sLOOP2:
LD
W,(HL)
CMP
W,(HL)
JR
NZ,sLOOP2
LD
(FLSCR),11001000B
JP
XXXXH
: Disable interrupts (IMF←"0")
: Clear the WDT binary counter.
: Disable the WDT.
: Enable command sequence execution.
: 1st bus write cycle
: 2nd bus write cycle
: 3rd bus write cycle
: 4th bus write cycle
: 5th bus write cycle
: 6th bus write cycle
: Loop until the same value is read.
: 1st bus write cycle
: 2nd bus write cycle
: 3rd bus write cycle
: 4th bus write cycle, (E000H)=3FH
: Loop until the same value is read.
: Disable command sequence execution.
: Jump to the flash memory area.
Example :This write control program reads data from address F000H and stores it to 98H in the RAM area.
LD
A,(0F000H)
LD
(98H),A
: Read data from address F000H.
: Store data to address 98H.
Page 149