This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

eeprom

hi;

i am storing data which takes 40 location (1 byte each)
i m using 24c64atmel which has page size of 32 bytes
i m facing problem in storing the last location
can u tell me how to resolve this problem? how to change the page in the sequential writing?

Parents
  • datasheet says that
    32k/64k eeprom is capable of 32 byte pagge write
    if more than 32 bytes are transmitted then data address will roll over and previous data will be overwritten

    i hav resolved this problem but i want to confirm whether i hav done it correct

    my code :
    savedata ()
    { data buffer[0]=data0; data buffer[1]=data1; data buffer[2]=data2; data buffer[3]=data3; if(j == 32) Write(4,360); else if(j == 36) Write(4,364); else Write(4,(320+j));

    j=j+4; if(j == 40) j = 0;
    }

    data0 to data3 is one set, this way i hav 9 more sets=total 10 sets

    where (320+0) to (320+28) my data is stored from set0 to set7 (32 bytes are over-one page is over)

    Write(4,(320+j))-- 4 locations from (320+j)

    and when j=32 it is 8th set written at 360 to 363

    when j=36 it is 9th set written at 364 to 367

Reply
  • datasheet says that
    32k/64k eeprom is capable of 32 byte pagge write
    if more than 32 bytes are transmitted then data address will roll over and previous data will be overwritten

    i hav resolved this problem but i want to confirm whether i hav done it correct

    my code :
    savedata ()
    { data buffer[0]=data0; data buffer[1]=data1; data buffer[2]=data2; data buffer[3]=data3; if(j == 32) Write(4,360); else if(j == 36) Write(4,364); else Write(4,(320+j));

    j=j+4; if(j == 40) j = 0;
    }

    data0 to data3 is one set, this way i hav 9 more sets=total 10 sets

    where (320+0) to (320+28) my data is stored from set0 to set7 (32 bytes are over-one page is over)

    Write(4,(320+j))-- 4 locations from (320+j)

    and when j=32 it is 8th set written at 360 to 363

    when j=36 it is 9th set written at 364 to 367

Children