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
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.
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.
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?
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)
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
·· 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
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)
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
DTQ
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Dallas, TX· USA
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)
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
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)
73
spence
k4kep
http://www.solutions-cubed.com/solutions cubed/RPB2003.htm
73
SPENCE
K54KEP
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
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)