Samsung C8278X ユーザーズマニュアル

ページ / 324
EMBEDDED FLASH MEMORY INTERFACE   
 
S3F8275X 
16-10  
 
 
PROGRAMMING TIP 
 Program 
 
 
 
 
 
SB1 
  LD   
FMUSR,#0A5H 
; User Program mode enable 
 LD 
 
FMSECH,#17H 
  LD   
FMSECL,#80H 
; Set sector address (1780H
−17FFH) 
  LD   
R2,#17H 
 
; Set a ROM address in the same sector 1780H
−17FFH 
 LD 
 
R3,#84H 
  LD   
R4,#78H 
 
; Temporary data 
  CP   
UserID_Code,#User_value  ; Check user’s ID code (written by user) 
   
 
 
 
 
  ; User_value is any value by user 
  JR   
NE,Not_ID_Code 
  ; If not equal, jump to Not_ID_Code 
  LD   
FMCON,#01010001B 
; Start program 
  LDC 
@RR2,R4 
 
; Write the data to a address of same sector(1784H) 
  NOP 
 
 
 
; Dummy Instruction, This instruction must be needed 
  LD       
FMUSR,#0 
 
; User Program mode disable 
 
 
 
 
 
Not_ID_Code: 
SB1 
LD   
FMUSR,#0 
 
; User Program mode disable