Conditions for page write in EEPROM

eeprom

I have learned about page write operations from App notes and data sheets of EEPROM chips.But i want to clear certain doubts.
I have an EEPROM chip which got 32KB and 64B Page Size.

1.Can i Write less than 64 Bytes?
Say n Bytes

If yes then What happens to the remaining locations(64-n) in case of Page write?(Will it Stay OxFF or turns 0).

This is the EEPROM chip 24LC256.

Best Answer

I'm not sure you realize what are the implications of an eeprom page. Here is the 24LC256 datasheet

One option to fill it is to write individual bytes. Using that mode you send the eeprom byte address for each byte you want to write so the page location poses no limit.

An alternative option is to write a block. The size of the block for the particular device is 64 bytes so the pages boundaries are

0-63
64-127
128-191
....

When you write a block you only send the memory address once and then send the bytes to be stored. The address increments internally for each new byte.
The page writes can only be used inside the boundaries of a page, what you reach the page boundaries you have to stop and start a new write sending the address again.

If you start a block write from an address that is near the end of the block then you can only write a few bytes until the end of the page rather than 64 bytes. For example If you start a block write from eeprom address 126 then you can only write two bytes, in locations 126 and 127. If you keep writing bytes then the address rolls over and overwrites the start of the block (in this case 64, 65..)

In any case values of any eeprom location where a write or erase action hasn't been performed maintain the existing value.

So for your question

Can I Write less than 64 Bytes?

Sure you can either with individual byte writes or with page write but withing the page boundaries which will be (0-63, 64-127...)

If yes then What happens to that locations?(Will it Stay OxFF or turns 0).

Is I explained earlier values in location where a write or erase cycle hasn't been performs maintain their existing value. Usually unwritten eeprom have 0xff written to all byte locations so this will be maintained.