AnsweredAssumed Answered

Problem in EEPROM write to 9s08DZ60

Question asked by Taj Mohammad Sayyad on Dec 4, 2017

HI, I am taj

I am using on chip EEPROM of 9s08dz60. I used clock of 160khz by programming FDIV = 74 for 12mhz bus clock, There is common register for both eeprom and flash.iIused NVOPT  = 22 (8 bit sector)and NVPROT = FF(unsecure).

I declared a global variable under eeprom memory. I tried erasing eeprom and programming it as specified in manual. I took delay of 6 clock cycles before checking FCBEF as well as for FCCF.I wrote command of 40 for erase sector. As i used global variable it is getting intialized to zero.I tried writing a byte to memory location, but it is not getting written when i read back that global variable into other variable.

I followed the procedure as:

1)If any error exists, clears the access and violation errors

2)wait 6 clock cycles before accessing FCBEF

3)load command word FCMD for byte write

4)launch the command by FCBEF = 1, can i debug whether its value is zero or not to know the command status

5)check for any errors and wait until FCCF set to 1

6)read the value of global variable

 

will the memory window get updated with the written value. I am seeing it to initialized to zero only...

Kindly provide any suggestion..

Outcomes