Shop OBEX P1 Docs P2 Docs Learn Events
Eeprom — Parallax Forums

Eeprom

leshea2leshea2 Posts: 83
edited 2005-10-28 22:20 in BASIC Stamp
Will this Eeprom work with the Basic Stamp sx2 ?

attachment.php?attachmentid=73917



I want to find the things I need like the eeprom, close to the place I·am, so that I will get it in less than a week and won't have to pay more for shipping than the products worth.
310 x 85 - 3K

Comments

  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-10-21 20:47
    It's probably an I2C device which means you'll have to synthesize I2C instructions -- it can be done though, I have posted several examples.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • leshea2leshea2 Posts: 83
    edited 2005-10-27 22:03
    I know that I can use an EEPROM to extended the memory on my BS2sx, but what about flash memory ? Could I use flash memory instead of an EEPROM ? Is it more convenient since everything loads and erases at the same time, instead of in slots ?

    Also, which type of flash memory is the best to you, NAND or NOR ?

    Thanks for your help !
  • Bruce BatesBruce Bates Posts: 3,045
    edited 2005-10-28 02:24
    Leshea -

    I wouldn't characterize it as "extending" the memory on your BS-2SX since the memory boundaries are not coincident. On the other hand, you can certainly add additonal, external memory to be accessed by your BS-2SX.

    I just didn't what you or anyone else to think you could write larger programs by "extending" the memory on the BS-2SX, or that you be able to have more internal variable space. As external memory, it can only contain data.

    Regards,

    Bruce Bates
  • FlyingFishFingerFlyingFishFinger Posts: 461
    edited 2005-10-28 03:21
    Well you could use it to save a lot of small programs and load them as needed, thereby effectively "extending" virtual the program space...
    It's what I'm experimenting with right now.
    Rafael
  • Bruce BatesBruce Bates Posts: 3,045
    edited 2005-10-28 04:00
    Rafael -

    With a compiled or assembled language, what you're attempting to do is quite trivial, as you probably know. All you essentially need to do is make the program segments self-relocating, write your own loader/linker, maintain the necessary system data areas properly, and 95% of the job is done. This is not true however for an interpreted language, such as that used on the PBASIC Stamp.

    The other problem I see, right up front, is that you have no direct access to the CPU, the instruction address register, the actual program stack, the register save areas, nor to the internal clock. Essentially you're "flying blind" and I'm not sure that's a very effective method of managing a "virtual program space". The last thing missing is PEEK/POKE which would be an alternative method of re-gaining the missing access.

    I'm not sure I see a practical need for additional program banks over the 8 presently available on the more advanced Stamps. None the less, good luck with your efforts, and let us know how you progress.

    Regards,

    Bruce Bates

    Post Edited (Bruce Bates) : 10/28/2005 4:03:57 AM GMT
  • FlyingFishFingerFlyingFishFinger Posts: 461
    edited 2005-10-28 04:03
    I have a BS2p and what I do is I compile a program into stamp memory, go to another slot, read the program I just compiled as the ASCII tokens and write them to EEPROM. When I want the program, I read the EEPROm and write to a free slot.
    That is what I'm thinkin of in theory, haven't done it yet (probably not till thanksgiving break) due to schoolwork overload.
    Rafael
  • FlyingFishFingerFlyingFishFinger Posts: 461
    edited 2005-10-28 04:04
    Actually I was just interested in that. I do not need more than the eight slots (and probably never likely). However, I will test my idea to see if it mill work for the future.
    Rafael
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2005-10-28 14:36
    flyingfishfinger said...(trimmed)
    I have a BS2p and what I do is I compile a program into stamp memory, go to another slot, read the program I just compiled as the ASCII tokens and write them to EEPROM. When I want the program, I read the EEPROm and write to a free slot.
    Why not just run the program from the slot it's loaded into instead of copying into another one to do the same thing?· That what the extra banks are there for.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • leshea2leshea2 Posts: 83
    edited 2005-10-28 17:24
    How much memory does th BS2sx's EEPROM have in all ? I know on your site it says 8x2k - 4000 instructions, but is that 4000 per slot or 4000 in all ?
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2005-10-28 17:43
    ~4,000 instructions per slot, depending on the instructions.· The
    slots are not contiguous (Connected together as one big block of memory) so you still have to keep it within 2K per program, then chain on to other programs/slots.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • leshea2leshea2 Posts: 83
    edited 2005-10-28 19:22
    So do I have to name the data to different slots, I mean how do I write to another slot without erasing the previous data ?
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2005-10-28 22:20
    The Help File explains this in the directives section.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
Sign In or Register to comment.