MC9S12XHZ512 EEPROM  data storage Problem

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

MC9S12XHZ512 EEPROM  data storage Problem

跳至解决方案
1,488 次查看
SARY
Contributor III

hi

 CAn anyone tell how to read and write data from the above microcontroller?

what command need to be send for reading data from EEPROM?

 

SARY

标签 (1)
1 解答
700 次查看
isionous
Contributor III

Reading from internal EEPROM is like reading from RAM or FLASH. "ldd $0C00" would read a word from EEPROM assuming that $0C00 is an address in EEPROM.  If you are writing in C and there is a variable in the EEPROM, just read from the variable like any other variable.

 

The EPAGE register controls which page of EEPROM is put into the EEPROM window (which is probably at $0800 for your device).

在原帖中查看解决方案

0 项奖励
回复
2 回复数
701 次查看
isionous
Contributor III

Reading from internal EEPROM is like reading from RAM or FLASH. "ldd $0C00" would read a word from EEPROM assuming that $0C00 is an address in EEPROM.  If you are writing in C and there is a variable in the EEPROM, just read from the variable like any other variable.

 

The EPAGE register controls which page of EEPROM is put into the EEPROM window (which is probably at $0800 for your device).

0 项奖励
回复
700 次查看
SARY
Contributor III

hi

Thanks for your help.There was some address problem .

I Changed thhe address and now its working fine.

Now I m able to read and write data from the EEPROM.

 

SARY

0 项奖励
回复