# How do you know an EEPROM is full?

Simple as that. How do you know it is full?

I don't know how to calculate bytes and the such. But i am trying to stuff about 2000 byte variables on a 256 EEPROM. Each single variable (all variables are bytes between 0 and 255) is written to it's own address. The addresses are a word var. between 1 and about 2000.

## Comment viewing options

I was in the Arduino Playground today and I saw http://www.arduino.cc/playground/Code/AvailableMemory  and I remembered this thread and thought I would throw it in.  Maybe it can be modified by someone who knows more than me to calculate EEPROM mem and not just RAM....

Nice, that looks useful, I'll probably incorporate that in my code for debugging. Thanks.

Dan

At the end of the day, two things are true...

One) I'm just storing some "moves" for the servos running the head. At most 5000 or 6000 numbers

Two) If for some crazy reason I get even close to 32767 or 32768, I'll just use another chip --I have room for 8 EEPROMS!!!

--Not to mention, I can't write to 0 as 0 is what I use for a "stay where you are" command when going to the "moveservos" subroutine.

Now can't we all just get along?

8P

But I really have to know! I need to know it to the last bit!

So let me get this straight... I can stick b1, b2 etc into 32,768 slots!! Holy crap! The number of preprogramed moves for Walter's head! I have spaces for 8 EEPROM's!! Woo Hoo!

I'm not sure, but it may be that the most significant address bit is ignored. This means that if you write to the last address (i.e. 32,767) and increase the address pointer, it will ignore the upper bits and start back at address 0.

let me clarify:

• the last address A= 32,767 or in binary %01111111 11111111
• A = A + 1
• A = 32,768 or in binary %10000000 00000000
• If the EEPROM ignores the left bit it will write to A=0
You should test for that.

That's because the 32768 bytes are addressed 0-32767 not 1-32768

A=32768 would be an invalid address.

If you had 4bytes they would be adressed 0-3 and 4 would be invalid as it would actually be a fifth byte.

It all depends on what the EEPROM does with the leftmost bits. Will it ignore a request to write to 32768 or will it write to 0?

You have 15 bits for addressing eeprom; so if you write a request to byte # 32768 you are addresing byte number :

10000000 00000000.