Philips Semiconductors

 

 

 

 

 

 

 

 

 

 

 

 

User’s Manual - Preliminary -

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

FLASH PROGRAM MEMORY

 

 

 

 

P89LPC901/902/903

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

FMCON

 

 

7

 

6

5

 

4

 

3

 

2

1

 

0

 

 

Address: E4h

 

 

 

 

 

 

 

 

 

 

-

 

-

-

 

-

 

HVA

 

HVE

SV

 

OI

 

 

Not bit addressable

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Reset Source(s): Any reset

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Reset Value:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

BIT

SYMBOL

FUNCTION

 

 

 

 

 

 

 

 

 

 

 

 

 

FMCON.7-4

 

-

Reserved.

 

 

 

 

 

 

 

 

 

 

 

 

 

FMCON.3

 

HVA

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.

 

FMCON.2

 

HVE

High voltage error. Set when an error occurs in the high voltage generator.

 

 

 

FMCON.1

 

SV

Security violation. Set when an attempt is made to program, erase, or CRC a secured

 

 

 

 

sector or page.

 

 

 

 

 

 

 

 

 

 

 

 

 

FMCON.0

 

OI

Operation interrupted. Set when cycle aborted due to an interrupt or reset.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Figure 14-1: Flash Memory Control Register

 

 

 

 

 

 

;* Inputs:

 

 

 

 

program (byte)

*

 

 

 

 

 

 

 

;*

R3 = number of bytes to

*

 

 

 

 

 

 

 

;*

R4 = page address MSB(byte)

 

 

 

 

*

 

 

 

 

 

 

 

;*

R5 = page address LSB(byte)

 

 

 

 

*

 

 

 

 

 

 

 

;*

R7 = pointer to data buffer in RAM(byte)

*

 

 

 

 

 

 

 

;* Outputs:

 

 

 

 

 

 

 

 

*

 

 

 

 

 

 

 

;*

R7 = status (byte)

set on error

 

 

*

 

 

 

 

 

 

 

;*

C = clear on no error,

 

 

*

 

 

 

 

 

 

 

LOAD

EQU

00H

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

EP

EQU

68H

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

PGM_USER:

FMCON,#LOAD

;load command, clears page register

 

 

 

 

MOV

 

 

 

 

MOV

FMADRH,R4

;get high address

 

 

 

 

 

 

 

 

 

MOV

FMADRL,R5

;get low address

 

 

 

 

 

 

 

 

 

MOV

A,R7

 

 

 

;

 

 

 

 

 

 

 

 

 

 

 

 

 

MOV

R0,A

 

 

 

;get pointer into R0

 

 

 

 

 

 

LOAD_PAGE:

FMDAT,@R0

;write data to page register

 

 

 

 

 

 

MOV

 

 

 

 

 

 

INC

R0

 

 

 

;point to next byte

 

 

 

 

 

 

 

 

 

DJNZ

R3,LOAD_PAGE

;do until count is zero

 

 

 

 

 

 

 

MOV

FMCON,#EP

;else erase & program the page

 

 

 

 

 

 

MOV

R7,FMCON

;copy status for return

 

 

 

 

 

 

 

MOV

A,R7

 

 

 

;read status

 

 

 

 

 

 

 

 

 

 

 

ANL

A,#0FH

 

 

 

;save only four lower bits

 

 

 

 

 

 

 

JNZ

BAD

 

 

 

;

 

 

 

 

 

 

 

 

 

 

 

 

 

CLR

C

 

 

 

;clear error flag if good

 

 

 

 

 

 

BAD:

RET

 

 

 

 

;and return

 

 

 

 

 

 

 

 

 

 

SETB

C

 

 

 

;set error flag

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

RET

 

 

 

 

;and return

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Figure 14-2: Assembly language routine to erase/program all or part of a page

2003 Dec 8

95

Page 95
Image 95
Philips P89LPC902, P89LPC901, P89LPC903 user manual Fmcon

P89LPC903, P89LPC902, P89LPC901 specifications

The Philips P89LPC901, P89LPC902, and P89LPC903 are a series of 8-bit microcontrollers designed for embedded system applications. These models, which belong to the LPC900 series, are notable for their affordability and versatility, making them an attractive choice for both hobbyists and professional developers.

One of the core features of the P89LPC901, P89LPC902, and P89LPC903 microcontrollers is their powerful 8-bit architecture. Operating at clock speeds up to 20 MHz, they deliver efficient performance suited for a range of tasks. Each model includes a comprehensive instruction set that supports various data manipulation and arithmetic functions, enabling extensive programming capabilities.

These microcontrollers come with built-in memory, with configurations that vary among the three models. The P89LPC901 typically features 4 KB of Flash memory and 256 bytes of RAM, while the P89LPC902 and P89LPC903 offer enhanced memory options. This Flash memory allows for reprogrammability, making it easier to update and modify applications as needed.

Another significant characteristic of the LPC900 series is their integrated peripherals. These models are equipped with a variety of I/O ports, allowing for easy interfacing with other devices and components. The P89LPC901 supports up to 32 I/O pins, while the P89LPC902 and P89LPC903 provide additional features such as analog-to-digital converters (ADCs), timers, and serial communication interfaces. This broad range of peripherals empowers developers to design complex applications without needing extra hardware.

Power consumption is also a key consideration for microcontroller applications. The P89LPC901, P89LPC902, and P89LPC903 are designed with low power consumption in mind, making them ideal for battery-operated devices and energy-efficient projects. They can operate in various power modes, allowing for greater flexibility in deployment.

In terms of technology, these microcontrollers utilize advanced CMOS technology, ensuring high reliability and durability. Their design offers a robust solution for numerous applications, including consumer electronics, industrial controls, and automation systems.

In summary, the Philips P89LPC901, P89LPC902, and P89LPC903 microcontrollers present an attractive combination of performance, integrated peripherals, low power consumption, and versatility. Their features cater to a wide array of applications, keeping them relevant in a rapidly evolving technology landscape. For hobbyists and professionals alike, these microcontrollers represent a reliable foundation for embedded system development.