Flat Panel Television User Manual
Table Of Contents
- TOC
- 01-Overview
- 02-Address Space
- 03-Addressing Modes
- 04-Control Registers
- 05-Interrupt Structure
- 06-Instruction Set
- 07-Clock and Power Circuits
- 08-RESET
- 09-IO PORTS
- 10-BASIC TIMER and TIMER 0
- 11-Timer1
- 12-CounterA
- 13-Timer2
- 14-EMBEDDED Flash Memory Interface
- 15-Low Voltagge Detector
- 16-Electrical Data
- 17-Mechanical Data
- 18-Flash MCU
- 19-Development Tool
- TOC.pdf

S3F80P5_UM_ REV1.00 EMBEDDED FLASH MEMORY INTERFACE
PROGRAMMING TIP — Sector Erase
Case1. Erase one sector
•
•
ERASE_ONESECTOR:
SB1
LD FMUSR,#0A5H ; User program mode enable
LD FMSECH,#40H ; Set sector address 4000H,sector 128,
LD FMSECL,#00H ; among sector 0~511
LD FMCON,#10100001B ; Select erase mode enable & Start sector erase
ERASE_STOP: LD FMUSR,#00H ; User program mode disable
SB0
s
Case2.Erase flash memory space from sector (n) to sector (n + m)
•
•
;;Pre-define the number of sector to erase
LD SecNumH,#00H ; Set sector number
LD SecNumL,#128 ; Selection the sector128 ( base address 4000H )
LD R6,#01H ; Set the sector range (m) to erase
LD R7,#7DH ; into High-byte(R6) and Low-byte(R7)
LD R2,SecNumH
LD R3,SecNumL
ERASE_LOOP: CALL SECTOR_ERASE
XOR P4,#11111111B ; Display ERASE_LOOP cycle
INCW RR2
LD SecNumH,R2
LD SecNumL,R3
DECW RR6
LD R8,R6
OR R8,R7
CP R8,#00H
JP NZ,ERASE_LOOP
•
•
14-9










