MC9S12DJ128 - EEPROM Use Problem

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

MC9S12DJ128 - EEPROM Use Problem

408 Views
Kr_Blue
Contributor I

Dear All.

 

I want use to EEPROM.

 

but Datasheet is not Register.

 

Ex) EADDRHI, EADDRLO, EDATAHI, EDATALO

 

So, I have not been able to continue longer.

 

I think EEPROM use ...

 

initEEPROM

{

EPROT = 0x88; // EEPROM block can be programmed and erased
 // EP = 0 => Protected sector Size 64bytes
// EPDIS = 1 => Protection disabled
// EPOPEN = 1 => Enabled for Program or Erase

ECLKDIV = 0x16;
// EDIV0~8 =22 =>
// PRDIV8 =0 => The oscillator clock is divided by 8 before feeding into the clock divider
// EDIVLD =0 => Register has been written

}

 

setEEPROM(unsigned int ADDR, unsigned int DATA)

{

ECMD = 0x20; //Word program

EADDR = ADDR;

EDATA = DATA;

}

 

When you do this, as will be seen....

 

I would like to know how to use EEPROM.

 

Register also...

 

Thank you... 

Labels (1)
0 Kudos
0 Replies