Philips Semiconductors
FLASH PROGRAM MEMORY
#include <REG921.H>
unsigned char READ_EL (unsigned char);
unsigned char GET_EL;
void main ()
{
GET_EL = READ_EL(0x02);
}
unsigned char READ_EL (unsigned char el_addr)
{
#define CONF
unsigned char el_data;
FMADRL
FMCON
el_data
return(el_data);
}
User Configuration Bytes
A number of user-configurable features of the P89LPC901/902/903 must be defined at power-up and therefore cannot be set by
the program after start of execution. These features are configured through the use of Flash byte UCFG1 shown in Figure 14-7.
2003 Dec 8
0x6C
= el_addr;
= CONF;
= FMDATA;
Figure 14-6: C-language routine to read a flash element
// access flash elements
// local for element data
//write element address to addr reg
//access flash elements command
/read the element data
99
User's Manual - Preliminary -
P89LPC901/902/903