Multiple EEPROM 24LC


Closed Thread
Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2008
    Posts
    2

    Post Multiple EEPROM 24LC

    I wish to increase the memory capacity in a device by adding multiple eeproms (24LC512), so that when the memory becomes 90% full it switches to the next eeprom by removing the power, i guess i could do this by sharing the sda/scl/gnd with all the eeproms and supply the vcc as a high output from a port on a pic 16f876. the question is what code would i use to know when the memory was 90% full or even 100%.
    any help would be appreciated.
    Thank you

  2. #2
    Join Date
    Sep 2004
    Location
    Mentor, Ohio
    Posts
    352


    Did you find this post helpful? Yes | No

    Smile

    Hi Alik,

    Some EEPROMs have address inputs such as A0, A1, and A2. These are binary inputs meaning 000 is the first EEPROM, 001 is the second, 010 is the third, 100 is the fourth, 101 is the fifth, 110 is the sixth and 111 is the seventh. So now if you needed alot of memory, you could have up to 7 different EEPROMs on your system. All of these EEPROMs will share the sda,scl,vcc, and vdd pins. You would set the address of each EEPROM by placing vcc or vdd on the appropriate address pins to set each units specific address.

    Some EEPROMs have a chip select input. Here you apply usually a low signal to this input to access the locations.

    As for how to code each of these you will need to search the forums here as I have seen some examples posted in the past. Your post donesn't say what it is exactly you are doing with the extra memory, being a data logger or what. But something that comes to mind is you could assign through your program certain items be stored in each memory location and your program will keep track of what's store in what memory chip. I kinda got the feeliing you are doing a logger of some sort. I have seen examples where the pic keeps track of how many records have been stored and knowing how many locations are used in each record doing the math, you would then know how many records can be stored on each chip and then you would know when to switch to the next EEPROM. I haven't seen any actual data logger programs on this forum but I have seen one in Nuts & Volts magazine a couple of years ago in the Stamp articles. It shouldn't be too hard to figure out how to do it from there.

    If you are able to get a copy of Les Johnson's book, "Experimenting with the PICBasicPro Compiler", there is a section that explains how to work with the different types of Serial EEPROM technologies such as I2C, SPI, and Microwire. Excellent book!

    Chuck Hellebuyck's book "Programming PIC Microcontrollers with PICBasic" has an example program using a 16F876 to store data in an external EEPROM. I believe he offers this book for a free download on his site www.elproducts.com.

    Hope some of this helps you out.

    BobK

  3. #3
    Join Date
    Sep 2007
    Location
    USA, CA
    Posts
    271


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by alik View Post
    I wish to increase the memory capacity in a device by adding multiple eeproms (24LC512), so that when the memory becomes 90% full it switches to the next eeprom by removing the power, i guess i could do this by sharing the sda/scl/gnd with all the eeproms and supply the vcc as a high output from a port on a pic 16f876. the question is what code would i use to know when the memory was 90% full or even 100%.
    any help would be appreciated.
    Thank you
    Although I do not know of a way to "automatically" detect when it is full, it should be quite easy. Presumably, if you are building the board and coding the PIC, you know what size the eeprom is and how much you have already written to it. Something simple like this, just before your write command...

    if MemoryAddress > $ffff - WRITESIZE then
    MemoryAddress = 0
    WriteAddress = WriteAddress + 1
    if WriteAddress > MaxWriteAddress then goto FullTimeSleep
    Endif

  4. #4
    Join Date
    Feb 2008
    Posts
    2


    Did you find this post helpful? Yes | No

    Exclamation update

    Thank you for your replies.

    Sorry I forgot to mention, it is for an off the shelf data logger and i do not have acces to recode the device, it will only work with the 24lc512, i have tried changing it to a 24lc1025, but the device does not work. so what i need to do is build an external circuit on which to have multiple 24lc512 eeproms and power up one at a time once the previous becomes full, using the high output from a port on the 16f876 as the Vcc for the 24lc512.

Similar Threads

  1. Can't read sequential addresses in external EEPROM
    By tjkelly in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 18th February 2010, 14:46
  2. Problem with I2C EEPROM addressing
    By Atom058 in forum General
    Replies: 14
    Last Post: - 3rd November 2009, 03:17
  3. Multiple Pics accessing single EEPROM
    By Atom058 in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 3rd February 2008, 17:22
  4. How to write/read strings EEPROM/LCD
    By g-hoot in forum mel PIC BASIC Pro
    Replies: 22
    Last Post: - 11th February 2007, 06:26
  5. word variable to 25lc640
    By TONIGALEA in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 6th July 2004, 19:59

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts