Philips UM10109 Microscope & Magnifier User Manual


 
© Koninklijke Philips Electronics N.V. 2005. All rights reserved.
User manual Rev. 02 — 23 May 2005 113 of 133
Philips Semiconductors
UM10109
P89LPC932A1 User manual
FMCON = LOAD; //load command, clears page reg
FMADRH = page_hi; //
FMADRL = page_lo; //write my page address to addr regs
for(i=0;i<64;i=i+1)
{
FMDATA = dbytes[i];
}
FMCON = EP; //erase & prog page command
Fm_stat = FMCON; //read the result status
if ((Fm_stat & 0x0F)!=0) prog_fail=1; else prog_fail=0;
return(prog_fail);
}
18.5 In-circuit programming (ICP)
(This feature was not present in the original P89LPC932).
In-Circuit Programming is a method intended to allow commercial programmers to
program and erase these devices without removing the microcontroller from the system.
The In-Circuit Programming facility consists of a series of internal hardware resources to
facilitate remote programming of the P89LPC932A1 through a two-wire serial interface.
Philips has made in-circuit programming in an embedded application possible with a
minimum of additional expense in components and circuit board area. The ICP function
uses five pins (V
DD
, V
SS
, P0.5, P0.4, and RST). Only a small connector needs to be
available to interface your application to an external programmer in order to use this
feature.
18.6 ISP and IAP capabilities of the P89LPC932A1
An In-Application Programming (IAP) interface is provided to allow the end user’s
application to erase and reprogram the user code memory. In addition, erasing and
reprogramming of user-programmable bytes including UCFG1, the Boot Status Bit, and
the Boot Vector is supported. As shipped from the factory, the upper 512 bytes of user
code space contains a serial In-System Programming (ISP) loader allowing for the device
to be programmed in circuit through the serial port. This ISP boot loader will, in turn, call
low-level routines through the same common entry point that can be used by the end-user
application.
18.7 Boot ROM
When the microcontroller contains a a 256 byte Boot ROM that is separate from the user’s
Flash program memory. This Boot ROM contains routines which handle all of the low level
details needed to erase and program the user Flash memory. A user program simply calls
a common entry point in the Boot ROM with appropriate parameters to accomplish the
desired operation. Boot ROM operations include operations such as erase sector, erase
page, program page, CRC, program security bit, etc. The Boot ROM occupies the
program memory space at the top of the address space from FF00 to FFFFh, thereby not
conflicting with the user program memory space. This function is in addition to the IAP-Lite
feature.