Shop OBEX P1 Docs P2 Docs Learn Events
24LC16 EEPROM Question — Parallax Forums

24LC16 EEPROM Question

EugalazEugalaz Posts: 39
edited 2009-07-20 00:28 in BASIC Stamp
Hello,
Could anybody please advise how to store data to an external EEPROM (24LC16) without using i2C commands? I kow it can be done as I have seen the code once before however now I only seem to find the i2C way. I do not wish to use this protocol as it's to heavy and I would much prefer to use SHIFTOUT or SEROUT commands instead of a thousand i2C directives (just kidding but you know what I mean). Any help in this would be much appreciated along with connection details. I believe that the SDA pin on the EEPROM needs a 10K Ohm pull up resistor to VCC as well as being connected to the stamp. SCL goes straight to the stamp and the WP gets grounded to VSS. A0 to A2 on·the EEPROM·can be left floating.
If anyone can supply some code I would be much obliged.
Thanking you in advance.

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2009-07-18 14:24
    There's a Nuts and Volts Column (#85) that discusses how to interface to I2C devices on Stamps that don't have the built-in I2C commands.

    www.parallax.com/Portals/0/Downloads/docs/cols/nv/vol3/col/nv85.pdf

    This article doesn't give explicit examples for the 24LC16, but there are other articles on the 24LC16 with examples that can be adapted.

    If you're still unhappy with the complexity of the code, you'll have to switch to a different kind of external EEPROM with an SPI (3-wire or 4-wire) interface where you can use the SHIFTOUT and SHIFTIN instructions.
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2009-07-18 16:52
    ...or get a Stamp (2p, 2pe, 2px)·that utilizes I2CIN/I2COUT commands.


    Post Edit -- There's a "Weekend Special" going on, an opportunity to Upgrade; strike when the iron is hot.

    Post Edited (PJ Allen) : 7/18/2009 5:03:00 PM GMT
  • EugalazEugalaz Posts: 39
    edited 2009-07-19 06:32
    Thanks Mike Green for your advice,
    Could you name the other EEPROM that uses an SPI interface? and are there any examples for them that will help me connect to and read/write to?
    Up untill now I have been using the old Parallax product called StampMEM. Remember them? they were a great product and very easy to communicate with. Don't know why they went off line. I would like to swap these with other EEPROMS that are just as easy to talk to. The StampMEM product is not iC2 but does connect with only one wire??
  • Mike GreenMike Green Posts: 23,101
    edited 2009-07-19 14:27
    The 24LC32A is just another I2C EEPROM. Microchip's 25LCxxx series uses an SPI interface and is roughly equivalent to the 24LCxxx series which uses the I2C interface. They have sizes ranging from 128 bytes (25LC010) to 128Kbytes (25LC1024). Read the datasheets for specifics for each device.
  • EugalazEugalaz Posts: 39
    edited 2009-07-20 00:13
    Thank you Mike,
    Do you know of any code examples and wiring to stamp details for the 25lcxxx series of EEPROM? Thanks to your help I think I am getting closer to a solution.
  • Mike GreenMike Green Posts: 23,101
    edited 2009-07-20 00:28
    Try the Nuts and Volts Columns. I'm not aware of other examples. There are a lot of other SPI devices and the wiring is similar, but there's a tremendous variability among the SPI devices. It's not like I2C where they're all connected the same and the signals are the same.

    There may be some other non-memory examples in the StampWorks Manual and in the Basic Analog and Digital tutorial.
Sign In or Register to comment.