How to write and read the EEPROM

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

How to write and read the EEPROM

2,056件の閲覧回数
syf
Contributor I

Hi,guys

 

I'm wondering how to write and read the EEPROM of MC9S12DG128.

 

I've found many articales about the EEPROM,but they only talk about how to write it,nearly no read

 

operation,can it be read?

ラベル(1)
0 件の賞賛
返信
1 返信

783件の閲覧回数
nandu
Contributor III

Hi Syf,

 

You can directly ready the EEPROM memory location as shown below

 

void read_eeprom(void)

    unsigned int eepromData;

    eepromData = *(unsigned int*)(0x800);

}

 

in which "0x800" is the EEPROM memory location from where you want to read the data.

 

Check the attached file, for the example of writing EEPROM memory

Message Edited by nandu on 2009-07-28 05:30 AM
0 件の賞賛
返信