Philips P89LPC938 User Manual page 118

Single-chip microcontroller
Table of Contents

Advertisement

Philips Semiconductors
Table 109: Flash Memory Control register (FMCON - address E4h) bit allocation
Bit
7
Symbol (R) -
Symbol (W) FMCMD.7
Reset
0
Table 110: Flash Memory Control register (FMCON - address E4h) bit description
Bit
Symbol
Access
0
OI
R
FMCMD.0
W
1
SV
R
FMCMD.1
W
2
HVE
R
FMCMD.2
W
3
HVA
R
FMCMD.3
W
4:7
-
R
4:7
FMCMD.4
W
4:7
FMCMD.5
W
4:7
FMCMD.6
W
4:7
FMCMD.7
W
An assembly language routine to load the page register and perform an erase/program
operation is shown below.
User manual
Write the erase-program command (68H) to FMCON, starting the erase-program
cycle.
Read FMCON to check status. If aborted, repeat starting with the LOAD command.
6
5
-
-
FMCMD.6
FMCMD.5
0
0
Description
Operation interrupted. Set when cycle aborted due to an interrupt or reset.
Command byte bit 0.
Security violation. Set when an attempt is made to program, erase, or CRC a secured sector or
page.
Command byte bit 1
High voltage error. Set when an error occurs in the high voltage generator.
Command byte bit 2.
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.
Command byte bit 3.
reserved
Command byte bit 4.
Command byte bit 5.
Command byte bit 6.
Command byte bit 7.
;**************************************************
;* pgm user code
*
;**************************************************
;*
;* 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
Rev. 03 — 7 June 2005
4
3
-
HVA
FMCMD.4
FMCMD.3
0
0
UM10119
P89LPC938 User manual
2
1
HVE
SV
FMCMD.2
FMCMD.1
0
0
*
*
*
*
*
*
*
*
*
© Koninklijke Philips Electronics N.V. 2005. All rights reserved.
0
OI
FMCMD.0
0
118 of 139

Advertisement

Table of Contents
loading

Table of Contents