EEPROM address definitions and delay

eeprompic

I am using 24LC256 EEPROM which have addresses from 0x0000-0x7fff. But I would like to predefine certain address from EEPROM to specific tasks, like from 0-100 for task-1 and so on.

Does predefining those addresses in the C code work?

Like:

const int add[31] =   {0,4,8,12,16,20,24,28,32,36,40};

Will it work or should we point address as 0x0000 - 0x7fff?

And my other question is, how much delay must be done after writing operation (simple write/Page write) in an EEPROM.

Best Answer

The first is a programming issue and the rest of your code will decide how you want to designate the sections of the device.

For the second, the datasheet gives a maximum of 5ms to program a byte or page, but you can use acknowledge polling to check if the device has completed the operation before that time has elapsed; see section 7.0, "Acknowledge Polling" of the Microchip 24AA256/24LC256/24FC256 datasheet for details.