24lc256 confusion

i am a little confused about the 24lc256. i was looking at the datalogger code for on of them and it seems to only use the first 16384 bytes. am i reading it wrong or what? is it possible to use the full 256kb or not? i don't see the point in paying an extra couple of dollars on a chip that i cant fully utilize
also looking at the data sheet it seemed to say that there is a special way to address the 8 different 32kb blocks although i couldnt seem to find how to address them. any ideas?
 

westaust55

Moderator
welcome to the PICAXE forum.

While the datalogger wizard only accepts up to 16K of data entry sets/intervals per campaign as standard, there is no reason why you cannot alter the program that the wizard creates to enable storage of more data at added intervals.

The wizard puts the code it creates into a PE BASIC program window and you can alter the code there and use the full 32k of each 24LC256 EEPROM.

When you enter the datalogger wizard, click on the 'Generate BASIC only" button to create the BASIC program code without automatically loading into the 18X.

In the wizard generated code, there are a couple of places with the memroy test starting
if address > 16383 then . . . . .​
just change these to:
if address > 32767 then . . . . .​

remember that while the 24LC256 EEPROM has 32k bytes of memory these are numbered 0 to 32767
 
Last edited:

westaust55

Moderator
Keep in mind also that for the 24LCxxx series of EEPROMs (and most others) the last digits - 256 in you case are the number of kbits capacity (not kbytes )
thus 256 = 256kbits = 32kbytes

Only the 24LC16 (to my memory) uses 8 separate block internally to access the entire EERPOM hence when using a 24LC16 EEPROM you can only have one EEPROM (or memory device in total as RAM and F-RAM use the same slave ID code) attached to an i2c bus
 
ahh pays to read carefully. i just took it that because they used a capital k that it was kilobyte rater than kilobit. i figured that i could just change the address > 16383 to 32737 but it always pays to check. As for the 8 segments it does state in the datasheet that it is made up of 8 32kilobit segments. They just don't have to be specifically addressed like in the 24lc16
 
the thing that gets me confused though is that in the data logger datasheet it states that the memory can be upgraded to 2MB by adding 7 more eeprom's. but if the eeprom's are only 32KByte (256Kbit) then there is only 256KByte NOT 2MByte. My best guess is that Rev. Ed. have mucked up with their labeling
 

MPep

Senior Member
Haven't read the datasheet you refer to, but 256kB = 2Mbit.

Merry XMas to everybody, and a fantastic New Year.

"Remember, don't drink and drive, because you might spill some!!!" - quote by Billy T James, NZ Comedian.
 

westaust55

Moderator
EEPROM confusion

ahh pays to read carefully. i just took it that because they used a capital k that it was kilobyte rater than kilobit. i figured that i could just change the address > 16383 to 32737 but it always pays to check. As for the 8 segments it does state in the datasheet that it is made up of 8 32kilobit segments. They just don't have to be specifically addressed like in the 24lc16
in reality it should always by a lower case "k" for kilo"
but a lower case "b" for bit and and capital (uppercase) "B" for byte.

But as per your other post, where the datasheet states:
For additional data storage capacity the optional AXE111 memory expansion board
can be used. This allows an additional seven 24LC256 to be connected, giving a
total of 2MB of memory (1024 blocks of 256 bytes).
that 2MB should read 2Mb or better still 256kBytes.

One for Rev Ed to record and update the datasheet at some time.


If you are really in need of extra EEPROM memory then the 24LC1025 could be considered. Mind you I think you will fond they cost a lot more per byte.
http://ww1.microchip.com/downloads/en/DeviceDoc/21941F.pdf
Now there is the first breaking of the chip size "rules" as the 1024kbit has the number 1025 :rolleyes:

However these chips only have two address pins to select the physical chip so a max of 4 can be used, so even with the max possible you will only double the total EEPROM to 512kbytes. The third adress pin is used to select between the two halves of the chip.
So cost wise, may be better off to use 8 of the 25LC512 chips.
 
Top