Shop OBEX P1 Docs P2 Docs Learn Events
Interfacing with EEPROM — Parallax Forums

Interfacing with EEPROM

abcdefgabcdefg Posts: 10
edited 2007-01-30 13:32 in BASIC Stamp
Can I interface the BASIC stamp with EEPROM ICs like the ones I linked to? Is there any example code floating around for either of these?

http://ww1.microchip.com/downloads/en/DeviceDoc/21941C.pdf
http://ww1.microchip.com/downloads/en/DeviceDoc/21713F.pdf

Comments

  • ZootZoot Posts: 2,227
    edited 2007-01-29 17:05
    Looks like it shouldn't be too much trouble. The chips are I2C (a two-wire serial interface protocol that is really, really common).

    The BS2p supports I2C commands natively (see I2CIN and I2COUT in the Stamp manual). If you have a BS2 then you can "bit-bang" the I2C protocol using some subroutines to handle the data transfers. See this thread:

    http://forums.parallax.com/showthread.php?p=466264

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    When the going gets weird, the weird turn pro. -- HST
  • abcdefgabcdefg Posts: 10
    edited 2007-01-30 13:28
    Zoot said...
    Looks like it shouldn't be too much trouble. The chips are I2C (a two-wire serial interface protocol that is really, really common).

    The BS2p supports I2C commands natively (see I2CIN and I2COUT in the Stamp manual). If you have a BS2 then you can "bit-bang" the I2C protocol using some subroutines to handle the data transfers. See this thread:

    http://forums.parallax.com/showthread.php?p=466264

    Just to be sure, can I write data from an analog-> digital converter onto the EEPROM and then later use the BASIC stamp to pull the data out and run it through a digital -> analog converter? Thanks!
  • ZootZoot Posts: 2,227
    edited 2007-01-30 13:32
    I don't see why not, but that's basically a software/coding issue, not a hardware/electronics issue, i.e., you need to write your program so:

    - you collect data into some variable(s)
    - format and write the variable data to the EEPROM
    - do other stuff for a while
    - read some data from EEPROM into some variable(s)
    - do stuff to the data
    - output data to a D/A

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    When the going gets weird, the weird turn pro. -- HST
Sign In or Register to comment.