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