P89LPC9331_9341_9351_9361 All information provided in this document is subject to legal disclaimers. © NXP B.V. 2012. All rights reserved.
Product data sheet Rev. 5.1 — 20 August 2012 55 of 94
NXP Semiconductors
P89LPC9331/9341/9351/9361
8-bit microcontroller with accelerated two-clock 80C51 core
7.29.3 Data EEPROM (P89LPC9351/9361)
The P89LPC9351/9361 has 512 bytes of on-chip Data EEPROM. The Data EEPROM is
SFR based, byte readable, byte writable, and erasable (via row fill and sector fill). The
user can read, write and fill the memory via SFRs and one interrupt. This Data EEPROM
provides 100,000 minimum erase/program cycles for each byte.
Byte mode: In this mode, data can be read and written one byte at a time.
Row fill: In this mode, the addressed row (64 bytes) is filled with a single value. The
entire row can be erased by writing 00H.
Sector fill: In this mode, all 512 bytes are filled with a single value. The entire sector
can be erased by writing 00H.
After the operation finishes, the hardware will set the EEIF bit, which if enabled will
generate an interrupt. The flag is cleared by software.
Remark: When voltage supply is lower than 2.4 V, the BOD EEPROM is tripped and Data
EEPROM program or erase is blocked. EWERR1 and EWERR0 bits are used to indicate
the write error for BOD EEPROM. Both can be cleared by power-on reset, watchdog reset
or software write.
7.30 Flash program memory
7.30.1 General description
The P89LPC9331/9341/9351/9361 flash memory provides in-circuit electrical erasure and
programming. The flash can be erased, read, and written as bytes. The Sector and Page
Erase functions can erase any flash sector (1 kB) or page (64 bytes). The Chip Erase
operation will erase the entire program memory. ICP using standard commercial
programmers is available. In addition, IAP and byte-erase allows code memory to be used
for non-volatile data storage. On-chip erase and write timing generation contribute to a
user-friendly programming interface. The P89LPC9331/9341/9351/9361 flash reliably
stores memory contents even after 100,000 erase and program cycles. The cell is
designed to optimize the erase and programming mechanisms. The
P89LPC9331/9341/9351/9361 uses V
DD
as the supply voltage to perform the
Program/Erase algorithms. When voltage supply is lower than 2.4 V, the BOD FLASH is
tripped and flash erase/program is blocked.
7.30.2 Features
Programming and erase over the full operating voltage range.
Byte erase allows code memory to be used for data storage.
Read/Programming/Erase using ISP/IAP/ICP.
Internal fixed boot ROM, containing low-level IAP routines available to user code.
Default loader providing ISP via the serial port, located in upper end of user program
memory.
Boot vector allows user-provided flash loader code to reside anywhere in the flash
memory space, providing flexibility to the user.
Any flash program/erase operation in 2 ms.
Programming with industry-standard commercial programmers.
P89LPC9331_9341_9351_9361 All information provided in this document is subject to legal disclaimers. © NXP B.V. 2012. All rights reserved.
Product data sheet Rev. 5.1 — 20 August 2012 56 of 94
NXP Semiconductors
P89LPC9331/9341/9351/9361
8-bit microcontroller with accelerated two-clock 80C51 core
Programmable security for the code in the flash for each sector.
100,000 typical erase/program cycles for each byte.
10 year minimum data retention.
7.30.3 Flash organization
The program memory consists of sixteen 1 kB sectors on the P89LPC9361 devices and
eight 1 kB sectors on the P89LPC9341/9351 devices and four 1 kB sectors on the
P89LPC9331 device. Each sector can be further divided into 64-byte pages. In addition to
sector erase, page erase, and byte erase, a 64-byte page register is included which
allows from 1 byte to 64 bytes of a given page to be programmed at the same time,
substantially reducing overall programming time.
7.30.4 Using flash as data storage
The flash code memory array of this device supports individual byte erasing and
programming. Any byte in the code memory array may be read using the MOVC
instruction, provided that the sector containing the byte has not been secured (a MOVC
instruction is not allowed to read code memory contents of a secured sector). Thus any
byte in a non-secured sector may be used for non-volatile data storage.
7.30.5 Flash programming and erasing
Four different methods of erasing or programming of the flash are available. The flash
may be programmed or erased in the end-user application (IAP) under control of the
application’s firmware. Another option is to use the ICP mechanism. This ICP system
provides for programming through a serial clock/serial data interface. As shipped from the
factory, the upper 512 bytes of user code space contains a serial ISP routine allowing for
the device to be programmed in circuit through the serial port. The flash may also be
programmed or erased using a commercially available EPROM programmer which
supports this device. This device does not provide for direct verification of code memory
contents. Instead, this device provides a 32-bit CRC result on either a sector or the entire
user code space.
Remark: When voltage supply is lower than 2.4 V, the BOD FLASH is tripped and flash
erase/program is blocked.
7.30.6 ICP
ICP is performed without removing the microcontroller from the system. The ICP facility
consists of internal hardware resources to facilitate remote programming of the
P89LPC9331/9341/9351/9361 through a two-wire serial interface. The NXP ICP facility
has made in-circuit programming in an embedded application - using commercially
available programmers - possible with a minimum of additional expense in components
and circuit board area. The ICP function uses five pins. Only a small connector needs to
be available to interface your application to a commercial programmer in order to use this
feature. Additional details may be found in the P89LPC9331/9341/9351/9361 User
manual.
7.30.7 IAP
IAP is performed in the application under the control of the microcontroller’s firmware. The
IAP facility consists of internal hardware resources to facilitate programming and erasing.
The NXP IAP has made in-application programming in an embedded application possible
P89LPC9331_9341_9351_9361 All information provided in this document is subject to legal disclaimers. © NXP B.V. 2012. All rights reserved.
Product data sheet Rev. 5.1 — 20 August 2012 57 of 94
NXP Semiconductors
P89LPC9331/9341/9351/9361
8-bit microcontroller with accelerated two-clock 80C51 core
without additional components. Two methods are available to accomplish IAP. A set of
predefined IAP functions are provided in a Boot ROM and can be called through a
common interface, PGM_MTP. Several IAP calls are available for use by an application
program to permit selective erasing and programming of flash sectors, pages, security
bits, configuration bytes, and device ID. These functions are selected by setting up the
microcontroller’s registers before making a call to PGM_MTP at FF03H. The Boot ROM
occupies the program memory space at the top of the address space from FF00H to
FEFFH, thereby not conflicting with the user program memory space.
In addition, IAP operations can be accomplished through the use of four SFRs consisting
of a control/status register, a data register, and two address registers. Additional details
may be found in the P89LPC9331/9341/9351/9361 User manual.
7.30.8 ISP
ISP is performed without removing the microcontroller from the system. The ISP facility
consists of a series of internal hardware resources coupled with internal firmware to
facilitate remote programming of the P89LPC9331/9341/9351/9361 through the serial
port. This firmware is provided by NXP and embedded within each
P89LPC9331/9341/9351/9361 device. The NXP ISP facility has made in-system
programming in an embedded application possible with a minimum of additional expense
in components and circuit board area. The ISP function uses five pins (V
DD
, V
SS
, TXD,
RXD, and RST
). Only a small connector needs to be available to interface your application
to an external circuit in order to use this feature.
7.30.9 Power-on reset code execution
The P89LPC9331/9341/9351/9361 contains two special flash elements: the Boot Vector
and the Boot Status bit. Following reset, the P89LPC9331/9341/9351/9361 examines the
contents of the Boot Status bit. If the Boot Status bit is set to zero, power-up execution
starts at location 0000H, which is the normal start address of the user’s application code.
When the Boot Status bit is set to a value other than zero, the contents of the Boot Vector
are used as the high byte of the execution address and the low byte is set to 00H.
Table 10
shows the factory default Boot Vector setting for these devices. A
factory-provided bootloader is pre-programmed into the address space indicated and
uses the indicated bootloader entry point to perform ISP functions. This code can be
erased by the user.
Remark: Users who wish to use this loader should take precautions to avoid erasing the
1 kB sector that contains this bootloader. Instead, the page erase function can be used to
erase the first eight 64-byte pages located in this sector.
A custom bootloader can be written with the Boot Vector set to the custom bootloader, if
desired.
Table 10. Default boot vector values and ISP entry points
Device Default
boot vector
Default
bootloader
entry point
Default bootloader
code range
1 kB sector
range
P89LPC9331 0FH 0F00H 0E00H to 0FFFH 0C00H to 0FFFH

P89LPC9331FDH,512

Mfr. #:
Manufacturer:
NXP Semiconductors
Description:
Microcontrollers - MCU 8-bit Microcontrollers - MCU IC 80C51 MCU FLASH 4K
Lifecycle:
New from this manufacturer.
Delivery:
DHL FedEx Ups TNT EMS
Payment:
T/T Paypal Visa MoneyGram Western Union