MC9S12DJ128 - EEPROM Use Problem

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

MC9S12DJ128 - EEPROM Use Problem

682件の閲覧回数
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... 

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