Flash Memory Control Register - Philips P89LPC906 User Manual

8-bit microcontrollers with accelerated two-clock 80c51 core 1kb 3v low-power byte-eraseable flash with 128 byte ram
Table of Contents

Advertisement

Philips Semiconductors
FLASH PROGRAM MEMORY
FMCON
Address: E4h
Not bit addressable
Reset Source(s): Any reset
Reset Value:
BIT
SYMBOL
FMCON.7-4
-
FMCON.3
HVA
FMCON.2
HVE
FMCON.1
SV
FMCON.0
OI
;* Inputs:
;*
R3 = number of bytes to program (byte)
;*
R4 = page address MSB(byte)
;*
R5 = page address LSB(byte)
;*
R7 = pointer to data buffer in RAM(byte)
;* Outputs:
;*
R7 = status (byte)
;*
C = clear on no error, set on error
LOAD
EQU
00H
EP
EQU
68H
PGM_USER:
MOV
FMCON,#LOAD
MOV
FMADRH,R4
MOV
FMADRL,R5
MOV
A,R7
MOV
R0,A
LOAD_PAGE:
MOV
FMDAT,@R0
INC
R0
DJNZ
R3,LOAD_PAGE
MOV
FMCON,#EP
MOV
R7,FMCON
MOV
A,R7
ANL
A,#0FH
JNZ
BAD
CLR
C
RET
BAD:
SETB
C
RET
2003 Dec 8
7
6
-
-
FUNCTION
Reserved.
High voltage abort. Set if either an interrupt or a brown-out is detected during a program
or erase cycle. Also set if the brown-out detector is disabled at the start of a program or
erase cycle.
High voltage error. Set when an error occurs in the high voltage generator.
Security violation. Set when an attempt is made to program, erase, or CRC a secured
sector or page.
Operation interrupted. Set when cycle aborted due to an interrupt or reset.
Figure 14-1: Flash Memory Control Register
;load command, clears page register
;get high address
;get low address
;
;get pointer into R0
;write data to page register
;point to next byte
;do until count is zero
;else erase & program the page
;copy status for return
;read status
;save only four lower bits
;
;clear error flag if good
;and return
;set error flag
;and return
91
5
4
3
-
-
HVA
*
*
*
*
*
*
*
*
User's Manual - Preliminary -
P89LPC906/907/908
2
1
0
HVE
SV
OI

Advertisement

Table of Contents
loading

This manual is also suitable for:

P89lpc907P89lpc908

Table of Contents