Program memory / storage memory with SX chip
duffling
Posts: 73
Im moving from basic stamp 2sx to the SX/B , im not sure of how the memory is organized on the SX , does it work in· a similar fashion to the basic stamp 2sx program slots?
or are there different steps to be taken if i require more program storage space?
thanks again.
·
or are there different steps to be taken if i require more program storage space?
thanks again.
·
Comments
it says it has·2048 x 12· EEPROM , im very unclear how the RAM and EEPROM are allocated on this chip ..
does the basic stamp 2sx have an additional eeprom ?·
slightly confused..
·
one thing im perplexed about ..
If the Basic stamp2sx uses the SX chip as does the SX/B system ..········· how does the basic stmp 2sx have 8 x 2k slots of Program memory ?······ when it appears the SX only has 2k?
i must be missing something very basic here .. so im sorry for that ..
since im used to the basic stamp 2sx , does the memory work in a similar way on the Sx/b? system ...... im currently filling up almost all the available program slots on my bs2sx after opptimizing everything nicely
so im going to need the program storage
currently im switching between program slots .. is a similar approach possible on the SX/b?····· and is a similar scratch pad memory able to be done with the Sx/b
thanks..
·
If you have the program memory full in a BS2sx, I don't think you are going to get that program to fit into an SX.
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Check out· the "SX-Video Display Module"
www.sxvm.com
"A problem well defined, is a problem·half solved."
·
An optimized PBASIC program is not the same as an optimized assembly program, with PBASIC creating a loop construct (a for(i=0;i<n;i++) in C) is the same if you count up, count down or count by 3's. In SX assembler there is a command called decsz which decrements a variable and skips the next instruction if the result is zero (there is also an incsz) which means your most efficient method of contructing a loop in assembler is so that it ends on the variable being zero and changes by one for each iteration. Also optimization for speed and optimization for space are entirely different beasts.
There is something vaguely akin to program slot in the SX but it is quite different, the entire space can be reached within a program unlike a BS slot, but there are restrictions such as you cannot execute a call to an address that has·the 9th bit of its address set, but·there·is a·simple workaround to this.
Post Edited (Paul Baker) : 3/21/2005 2:59:08 PM GMT
to clarify ..
i CAN add an eeprom to my SX to store data...... ( i am storing many strings and such in the bs2sx )
from your experience you have managed to write very serious code within the limits of the SX 2k limit ?
am i correct in assuming that .. done correctly you can fit quite a complicated program even with SX/B code into the sx memory?
i also assume that assembly mixed in there will allow even more code to be put inside ..
·