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.
There’s 8 bits in a byte. If
There’s 8 bits in a byte. If the EEPROM holds 256 kilobits, that’s 256 / 8 = 32 kilobytes (and the kilo means 1024, so that’s 32,768 bytes, or 262,144 bits).
I haven’t actually played with the 256-kilobit EEPROM chips I’ve got yet, but it seems to me that if you’re specifying the absolute memory location that you’re writing to (in bytes), then you just know that you have 32,768 different one-byte slots to write to. Assuming they’re zero-indexed, that means you can write to slot 0, 1, …, 32766, 32767. When you’ve written to all of those slots, then your chip is full.
Dan
TGC Up in da hizzy!
Damn good answer, my friend!!
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!
Yeah, assuming you’ve got
Yeah, assuming you’ve got the same EEPROM chip that I do, the 24LC256 (I got mine from SparkFun), it’s got a capacity of 256 kbits, so 32 kbytes. Lots of space
Dan
Watch out!
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.
Guys, Guys the “last byte” thing…
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?
Call me a techy
But I really have to know! I need to know it to the last bit!
I was in the Arduino
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,
Nice, that looks useful, I’ll probably incorporate that in my code for debugging. Thanks.
Dan