Searching \ for '[SX] Clarifications for Comparison of STAMP and SX' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/ubicom/devices.htm?key=sx
Search entire site for: 'Clarifications for Comparison of STAMP and SX'.

Exact match. Not showing close matches.
PICList Thread
'[SX] Clarifications for Comparison of STAMP and SX'
2006\10\13@003044 by John Kauffmann/a

flavicon
face
In SX Microcontrollers, SX/B Compiler and SX-Key Tool, John Kauffman wrote:

I would like to clarify my understanding of the memory issues for STAMP BS2 and SX28. These are questions that are more broad then the architecture of the SX RAM (which is well-described by Guenther).

Some of the confusion comes because I do not have a degree in Comp Sci. I can write the code to make it work, but I don't understand what is happening. I have studied this in the literature and Wikipedia, but have not found a place where it is all brought together and directly applied to a comparison of the Parallax products. Thanks.

?? The question marks indicate a request for info. ??

First, there are three physical kinds of memory we can discuss:
           EEPROM - external (read & write at run time)
           EE/Flash - built in (read only at run time)
           RAM - built in (read & write at runtime)

Here are the speeds
           EEPROM
slow
also requires time to request and transfer data from EEPROM to CPU
           EE/Flash
                       Fast- same as CPU?
                       No need for off-chip requests and transfers
           RAM
                       Same speed as CPU ?
                       Transfer fastest because closely integrated with CPU?

Here is how the microcontroller families use them:
STAMP
           Load mode
puts program (as tokens)into EEPROM
puts data for tables into EEPROM
           Run mode:
pulls program tokens from EEPROM and interprets
reads tables from EEPROM
holds variables in RAM
can write data to EEPROM
SX
           Load mode
puts compiled program package into EE/Flash
puts into EE/Flash data tables
           Run mode:
Executes program from EE/Flash
Reads tables from EE/FLASH
Holds variables in RAM

Here are the sizes from Spec sheets
STAMP
           EEPROM = 2k bytes (about 500 instructions) (other stamps are 8x 2k)
                       Must hold program tokens
Extra space available for data tables (are these tokenized ?? )
Extra space available for storing data at runtime
           RAM = 32 bytes, 26 available for variables
           EE/FLASH = ?? (not of concern to us, since not directly available ?)
SX      
           EEPROM = 0
           EE/Flash = 2048(bytes?) x 12
                       Must hold compiled program
Extra space available for data tables
Are data tables part of the compiled package or somehow separate?
           RAM = 136 bytes

Additional questions:

?? In one post someone mentioned that the STAMP has much more space for code. But it seems the STAMP has max 2k in the EEPROM and the SX has 12 x 2k in its EEFLASH. Furthermore, the compiled package for SX should be smaller then the tokens for STAMP, so more commands in SX, no? (Bean will say I'm comparing apples to oranges, but I guess a need a better mental model of each fruit).

?? When the SX program uses a constant, that is written to EEFlash at load and thus frees space in RAM for more variables?

?? Does the STAMP use EEFlash in its PIC but that is only accessed by the interpreter and thus not of concern to us as programmers?

?? (Not crucial question) I'm curious about the SX internal structure of EEFlash and RAM.
- Are they different physical areas on one chip -or- are there multiple chips within the SX package (one being an EEFlash chip) ?
- Why is the RAM so limited - does it take a lot more transistors to create or is their a limit due to size of address? Perhaps it takes a lot of current to keep RAM active? Perhaps good programmers don' t need a lot of variables.

Thanks.
---------- End of Message ----------

You can view the post on-line at:
http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=149036
Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com
The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2006 (http://www.dotNetBB.com)

2006\10\13@043959 by beann/a

flavicon
face
In SX Microcontrollers, SX/B Compiler and SX-Key Tool, bean wrote:

[Quoting: "John Kauffman"]
First, there are three physical kinds of memory we can discuss:
           External EEPROM - (read & write at run time) Limited # of writes, slow to write
           Internal Flash/EE - built in (read only at run time on the SX devices)
           RAM - built in (read & write at runtime) Unlimited # of writes, fast to read or write

Here are the speeds
           External EEPROM
slow to write
also requires time to request and transfer data from EEPROM to CPU if external
           Internal Flash/EE
                       Fast to read; Parallel connection to CPU
                       No need for off-chip requests and transfers
                       SX processors do not allow CPU to write to internal EE/Flash
           RAM
                       Fast to read & write; Parallel connection to CPU
                       Transfer fastest because closely integrated with CPU

Here is how the microcontroller families use them:
STAMP
           Load mode
puts program (as tokens)into EEPROM
puts data for tables into EEPROM
           Run mode:
pulls program tokens from EEPROM and interprets
reads tables from EEPROM
holds variables in RAM
can write data to EEPROM
SX
           Load mode - Requires a programming device (SX-Key, SX-Blitz)
puts compiled program package into Flash/EE
puts data tables into Flash/EE
           Run mode:
Executes program from Flash/EE
Reads tables from Flash/EE
Holds variables in RAM

Here are the sizes from Spec sheets
STAMP
           EEPROM = 2k bytes (about 500 instructions) (other stamps are 8x 2k)
                       Holds tokenized PBASIC program
Extra space available for data tables (are these tokenized NO )
Extra space available for storing data at runtime

           RAM = 32 bytes, 26 available for variables
           Flash/EE = Contains PBASIC interepter (not of concern to us, since not directly available ?)

SX      
           EEPROM = 0
           EE/Flash = (2048) 12-bit words
                       Holds compiled program (machine code, directly executable by CPU)
Extra space available for data tables
Are data tables part of the compiled package or somehow separate
(The cpu makes no distinction between instructions and data, if you put a DATA line in the middle of a program, the CPU will attempt to execute the data as instructions (causing all kinds of havoc).
           RAM = 136 bytes

Additional questions:

?? In one post someone mentioned that the STAMP has much more space for code. But it seems the STAMP has max 2k in the EEPROM and the SX has 12 x 2k in its EEFLASH. Furthermore, the compiled package for SX should be smaller then the tokens for STAMP, so more commands in SX, no? (Bean will say I'm comparing apples to oranges, but I guess a need a better mental model of each fruit).

It depends on what instructions are used, and how the program is written. For example the code generated by SX/B for SEROUT is held in the stamp's Flash/EE memory space, so the SEROUT command basically takes 1 token. Whereas on the SX is takes many instructions to perform a SEROUT command. I would say on your average program you could be pretty much the same amount of functionallity in each.

---------------------
?? When the SX program uses a constant, that is written to EEFlash at load and thus frees space in RAM for more variables?

Yes, just like the stamp. Don't use a variable where a constant will do.

-----------------------
?? Does the STAMP use EEFlash in its PIC but that is only accessed by the interpreter and thus not of concern to us as programmers?

Correct, the Flash/EE in the stamp's PIC contains the PBASIC interpreter. It cannot be changed or seen.
--------------------
?? (Not crucial question) I'm curious about the SX internal structure of EEFlash and RAM.
- Are they different physical areas on one chip -or- are there multiple chips within the SX package (one being an EEFlash chip) ?

I'm sure they are physical structure is different. And they are connected to different busses too.
---------------------
- Why is the RAM so limited - does it take a lot more transistors to create or is their a limit due to size of address? Perhaps it takes a lot of current to keep RAM active? Perhaps good programmers don' t need a lot of variables.

One limitation is the width of the data buss (8 bits on the SX). Why the SX28 doesn't use the entire memory space, I don' t know. But the SX48 does.

Thanks.
I sure other's will correct me if I have led you astray somewhere...

Bean.

---------- End of Message ----------

You can view the post on-line at:
http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=149036#m149047
Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com
The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2006 (http://www.dotNetBB.com)

2006\10\18@020044 by George Herzogn/a

flavicon
face
In SX Microcontrollers, SX/B Compiler and SX-Key Tool, George Herzog wrote:

Originally, the BasicStamp was a PIC.  Later Parallax discovered that the SXes allowed them more memory and speed.

As a result, the physical comparision of memory is quite simple.  The SXes are the microprocess for the BasicStamp.  As I recall the BS2sx is the only one that uses the SX28 which has 128 bytes of RAM and 2K eeprom on board.  The new ones use an SX48 with 256 bytes of RAM and 4K of eeprom on board.

Additionally, the BS has an attached EEPROM that provides for tokenizing the PBasic.

Those are the physical comparisions.

Why is the RAM so limited?  Mainly because you don't need much more than 256 bytes of variables when you are handling one or two bytes at a time.  The real power is the speed at which you can move the processed bytes.  Your PC uses a completely different architecture and large RAM spaces allow you to load the whole program from a hard disk file into RAM for quick operation.  These microcontrollers don't store programs in a file system, so they really don't need to transfer operation into RAM for more efficient us.  They are simply dedicated to their particular program.

Awkwardly the new AVRs have jumped RAM and Flash into 32K, 64K and beyond.  But, the fundumental question is, "Does anyone really fill all that RAM or do it remain empty capacity?"  
In other words, RAM alone is not computing power.  A completely balanced, well understood architecture is required to gain real power.  I suggest you learn to program the SXes at the assembly level if you want to understand this.   And if you want to have more power, take a look at the Propeller.

---------- End of Message ----------

You can view the post on-line at:
http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=149036#m150016
Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com
The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2006 (http://www.dotNetBB.com)

More... (looser matching)
- Last day of these posts
- In 2006 , 2007 only
- Today
- New search...