Shop OBEX P1 Docs P2 Docs Learn Events
add ram — Parallax Forums

add ram

p455w0rdp455w0rd Posts: 4
edited 2005-04-02 17:55 in BASIC Stamp
i have a few extra ram chips...can i connect and use them on my basic stamp?

Comments

  • kb2hapkb2hap Posts: 218
    edited 2005-04-01 03:19
    do you have any part numbers you question is far to vague to give an answer

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    DTQ
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-04-01 03:23
    You can't use them to expand the Stamp's memory, but -- with some serious creativity -- you may be able to connect them and use it as external storage.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
    Dallas, TX· USA
  • Robert SchwartzRobert Schwartz Posts: 141
    edited 2005-04-01 03:23
    The short answer is yes. However, each RAM chip is connected differently so we will need part numbers to tell you exactly how to connect/interface them.
  • allanlane5allanlane5 Posts: 3,815
    edited 2005-04-01 15:12
    You can use 'static' RAM chips, with a lot of creativity. You can't use 'Dynamic' RAM chips, as these require a refresh cycle the BS2 won't support.

    And it still won't expand the 'RAM' memory space of the BS2 -- that's fixed at 26 bytes (but the BS2p has 'scratch pad' ram you can use)
  • p455w0rdp455w0rd Posts: 4
    edited 2005-04-01 21:41
    thx..i'm not @ home right now, but they're actually from and old commodore 64...i'll get part numbers when I get back...
  • p455w0rdp455w0rd Posts: 4
    edited 2005-04-01 21:42
    Jon Williams said...
    You can't use them to expand the Stamp's memory, but -- with some serious creativity -- you may be able to connect them and use it as external storage.

    this is my goal...
  • allanlane5allanlane5 Posts: 3,815
    edited 2005-04-02 01:42
    Um, the C64 did not have static ram, it had 64K of Dynamic Ram. Don't bother, it is more trouble than it's worth.
  • p455w0rdp455w0rd Posts: 4
    edited 2005-04-02 02:03
    hmm..what about the ram chip from the snes game cartridge for super mario world?
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2005-04-02 10:37
    You would be better off spending a bit of money for appropriately interfaced RAM chips. I2C or one-wire technology.

    By the time you figure out the whole store behind these savalged RAM chips, you will probably just decide that it ain't worth trying to retrofit to older technology. The first problem is that the architecture for them is different. You need to have both a DATA bus and an ADDRESS bus. The DATA bus is a minimum of 8 lines and then you likely need 4-16 more lines for the ADDRESS.

    The BasicStamp has merely 16 i/o lines - so you begin to run out of lines for other purposes [noparse][[/noparse]such as robotic control] The new technologies use RAM on one or two i/o lines and Parallax has some programming information.

    Do you really need more than the 26 bytes of RAM on board, or is this a kind of belief that the more RAM you have, the better the computer?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    G. Herzog in Taiwan
  • GadgetmanGadgetman Posts: 2,436
    edited 2005-04-02 12:31
    I, too, have looked into the problem of adding RAM to the BS2, and frankly, it's a mess...

    You either use something serial like an I2C chip(which I'll recommend) or you'll need to use heaps of shift-registers and counters just to avoid using all the available IO pins to read your extra RAM/ROM/EEPROM/Whatever...

    Even if you make it work, somehow, you will have to spend precious extra Bytes of your Program space to access this 'extra'
    memory, so it's only worthwhile IF you can hook up a lot of extra memory.

    If you absolutely MUST do it yourself, take a look at this page:
    http://home.c2i.net/trygveh/english/gadgetman/pocket/psion/org1pak.html
    The Psion Organiser One(from 1984) used 8 or 16KB EPROMs to store user data, and this page shows how the pack was built, and also explains most of how it works...
    It can be adapted to Static RAM, also.
    Psion later made a battery backed RAMPak for the Organiser II series using the same principle, and they also made FLASHPaks, with up to 128KB of EEPROM.
    It should be possible to use a shift-register to cut down on the pins for the DATA bus.

    The reason it uses a counter for the adresses instead of a shift-register is to increase the speed of search and read functions, as you only have to pulse one pin to reach the next sequential address when using counters. If you used shift-registers you'd have to clock out 16 bits to get to the next address. Much slower...

    With write it didn't matter as much as writing to EPROM is slow, anyway...
    (mostly because they needed to build up the 22V programming pulse in a capacitor)
  • SPENCESPENCE Posts: 204
    edited 2005-04-02 14:52
    Here is a link for ram pack b a rtr module and at the bottom of the page software to run it with the stamps. Lates listing 32k x 8 so that should be plenty of space. This is a serial interface for the stamp.
    73
    spence
    k4kep
  • SPENCESPENCE Posts: 204
    edited 2005-04-02 14:54
    SORRY THE PASTE DID NOT WORK.

    http://www.solutions-cubed.com/solutions cubed/RPB2003.htm

    73
    SPENCE
    K54KEP
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2005-04-02 16:42
    ·· Not always, but often memory constraints can be avoided by careful examination of the variables in use, and when they are used within the program.· Often variables can be re-used.· That is, the same variable can be called by several different routines for unrelated information.· Another common loss of variable space is declaring variables larger than what's needed.· For example, a Byte variable for a Yes/No, High/Low, On/Off type of use should be declared as a BIT variable.· Loop counters that never exceed 15, or 4-pin port reads can be declared as nibbles.· Etc.



    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • GadgetmanGadgetman Posts: 2,436
    edited 2005-04-02 17:55
    Don't forget using offset values, too....

    For example, if you're measuring body-temperature, which should be 37 degrees(in Celsius.) by assuming that it always stays between 35 and 43 degrees, you end up with a gap of 8 degrees, which fits well withing a nibble, with space left over for .5 degree resolution.
    Of course, it means you'll have to add 35 to the variable in formulas, increasing the size of the program slightly, but you just saved a nibble in variable space.

    The same goes for other variables which have known 'operating ranges' like engine temperature, chargeing voltage, and so on...
    (You may want to set up some 'out of bounds' flags for some, though, but if you save a Byte or nibble, tossing out a bit here and there isn't that bad)
Sign In or Register to comment.