Philips P89LPC907, P89LPC906, P89LPC908 user manual Conf

Models: P89LPC907 P89LPC908 P89LPC906

1 110
Download 110 pages 25.77 Kb
Page 95
Image 95

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

Page 95
Image 95
Philips P89LPC907, P89LPC906, P89LPC908 user manual Conf