Philips P89LPC906 Computer Monitor User Manual


 
Philips Semiconductors
User’s Manual - Preliminary -
P89LPC906/907/908
FLASH PROGRAM MEMORY
2003 Dec 8 95
Figure 14-6: C-language routine to read a flash element
#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 0x6C // access flash elements
unsigned char el_data; // local for element data
FMADRL = el_addr; //write element address to addr reg
FMCON = CONF; //access flash elements command
el_data = FMDATA; /read the element data
return(el_data);
}