I want to write and read data in/from internal EEPROM of MC9S12XHZ512 micro-controller. Can anyone provide me sample code for it.
I have use processor expert of it but it's showing some error , i have posted below.
Solved! Go to Solution.
Hi KDN,
I don't think you use GetWord() in a right way.
you need use GetWord() as below:
byte If_ok;
word mydata;
If_ok = IEE1_SetWord((IEE1_TAddress)0x100000,0x1234);
If_ok = IEE1_GetWord((IEE1_TAddress)0x100000,&mydata);
I attached my demo code and video, it's for 9S12XHY256 but the method is the same for all HCS12X device
Have a great day,
Zhang Jun
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi KDN,
I don't think you use GetWord() in a right way.
you need use GetWord() as below:
byte If_ok;
word mydata;
If_ok = IEE1_SetWord((IEE1_TAddress)0x100000,0x1234);
If_ok = IEE1_GetWord((IEE1_TAddress)0x100000,&mydata);
I attached my demo code and video, it's for 9S12XHY256 but the method is the same for all HCS12X device
Have a great day,
Zhang Jun
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------