Shop OBEX P1 Docs P2 Docs Learn Events
expanding eeprom space? (I2C EEPROM connection and usage help needed) — Parallax Forums

expanding eeprom space? (I2C EEPROM connection and usage help needed)

krokikroki Posts: 21
edited 2004-12-11 20:04 in BASIC Stamp
Hi!

Could anyone please help me with my problem?:

I·bought a BS2sx IC for the speed a few months ago.
But in between i figured, that i need more program DATA space!

Is there a way to interface a serial (I2C) EEPROM to the BS2? I need to store many data in it!
i try to use a same one, that's in the SX IC, but have no interface mode found.

Best regards:

Kroki

Comments

  • achilles03achilles03 Posts: 247
    edited 2004-12-10 12:23
    Your post is a little confusing. Do you need more program space? Or do you just want to store more data? If you want more program space, then you can use some of the other program slots in the BS2sx. You have a total of 8 program slots, each with 2k of memory. Uploading 1 program to the BS2sx only uses 1 slot, and leaves 7 unused. Read up on the program slots, and that'll answer alot of questions.

    If you just want to store more data, you can either use empty space in your program slots, or use an external EEPROM:

    http://www.parallax.com/detail.asp?product_id=602-00008

    And if 8k isn't big enough, you can get an EEPROM that interfaces the same way, but has up to 64k memory.

    Dave
  • krokikroki Posts: 21
    edited 2004-12-10 12:35
    Thanx for the anwser!

    I know i was a little bit confusing, but this was the first time I wrote in this Forum, and I have only bad memories of forums like this.

    I need more data space, and a serial EEPROM looks promising, but i don't know how to connect and usi it in program with the BS2SX.

    as I know only the BS2p and above has I2C commands.



    This is what I need help with!



    Thanx
  • allanlane5allanlane5 Posts: 3,815
    edited 2004-12-10 14:19
    I believe the 24LC640 is an external SPI EEPROM with 8-pins. You use the SHIFTIN/SHIFTOUT command with it. The I2C EEPROMS tend to have more space -- but you can still use the SPI EEPROMS.
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2004-12-10 14:50
    I've attached a program that you can use to add an external·I2C EEPROM for data.


    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
    Dallas Office


    Post Edited (Jon Williams) : 12/10/2004 3:01:58 PM GMT
  • krokikroki Posts: 21
    edited 2004-12-10 15:02
    Thanx!

    I'll try it as soon as i get home from work:-)
  • krokikroki Posts: 21
    edited 2004-12-11 18:53
    Hi!

    Sorry to ask u again, but i have a question:

    I connected the SDA to pin 8 and SCL to pin 9.
    The sample is for 24LC256, but i haveLC128.
    Is it enough if I change the pins and expressions, or i have to change something in lines like these:

    EE24LC256·············· CON········ %1010· << 4

    devNum = %000····················································· ' chip select (%000 - %111)
    slvAddr = EE24LC256 | (devNum << 1)······················· ' setup slave ID
    addrLen = 2··························································· ' 2 bytes in word address

    And do i have to use 4 lines for 2 EEPROM's?

    Thanx for the anwser if possible.

    Best regards:

    Kroki
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2004-12-11 19:56
    Do you have the data sheet for your device? You should. When you read it you'll find that the control ID is the same as the '256 (in fact, most memories that I've worked with are %1010).

    The code is written so that yu can address up to 8 devices -- put the device number (0 - 7) in the variable devNum.

    You only need two lines (SDA and SCL) for your I2C devices; the whole point of I2C is a shared bus. You probably should do a bit of research to learn how the bus works before attempting to implement it.· This article may help:

    http://www.parallax.com/dl/docs/cols/nv/vol5/col/nv115.pdf

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
    Dallas Office
  • krokikroki Posts: 21
    edited 2004-12-11 20:04
    Thanx!

    In between i did a little research, and found the specification of I2C and th 24LC128 datasheet.

    Thanx again, and sorry for bothering!

    Kroki
Sign In or Register to comment.