In SX Microcontrollers, SX/B Compiler and SX-Key Tool, John Kauffman wrote: [3]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). [/3] [3] [/3] [3]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.[/3] [3] [/3] [3]?? The question marks indicate a request for info. ??[/3] [3] [/3] [3]First, there are three physical kinds of memory we can discuss:[/3] [3] EEPROM - external (read & write at run time)[/3] [3] EE/Flash - built in (read only at run time)[/3] [3] RAM - built in (read & write at runtime)[/3] [3] [/3] [3]Here are the speeds[/3] [3] EEPROM[/3] [3]slow[/3] [3]also requires time to request and transfer data from EEPROM to CPU[/3] [3] EE/Flash[/3] [3] Fast- same as CPU?[/3] [3] No need for off-chip requests and transfers[/3] [3] RAM[/3] [3] Same speed as CPU ?[/3] [3] Transfer fastest because closely integrated with CPU?[/3] [3] [/3] [3]Here is how the microcontroller families use them:[/3] [3]STAMP[/3] [3] Load mode [/3] [3]puts program (as tokens)into EEPROM [/3] [3]puts data for tables into EEPROM [/3] [3] Run mode:[/3] [3]pulls program tokens from EEPROM and interprets[/3] [3]reads tables from EEPROM[/3] [3]holds variables in RAM[/3] [3]can write data to EEPROM[/3] [3]SX[/3] [3] Load mode [/3] [3]puts compiled program package into EE/Flash[/3] [3]puts into EE/Flash data tables[/3] [3] Run mode:[/3] [3]Executes program from EE/Flash[/3] [3]Reads tables from EE/FLASH[/3] [3]Holds variables in RAM[/3] [3] [/3] [3]Here are the sizes from Spec sheets[/3] [3]STAMP[/3] [3] EEPROM = 2k bytes (about 500 instructions) (other stamps are 8x 2k)[/3] [3] Must hold program tokens[/3] [3]Extra space available for data tables (are these tokenized ?? ) [/3] [3]Extra space available for storing data at runtime[/3] [3] RAM = 32 bytes, 26 available for variables[/3] [3] EE/FLASH = ?? (not of concern to us, since not directly available ?)[/3] [3]SX [/3] [3] EEPROM = 0[/3] [3] EE/Flash = 2048(bytes?) x 12 [/3] [3] Must hold compiled program[/3] [3]Extra space available for data tables [/3] [3]Are data tables part of the compiled package or somehow separate?[/3] [3] RAM = 136 bytes[/3] [3] [/3] [3]Additional questions:[/3] [3] [/3] [3]?? 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).[/3] [3] [/3] [3]?? When the SX program uses a constant, that is written to EEFlash at load and thus frees space in RAM for more variables?[/3] [3] [/3] [3]?? 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? [/3] [3] [/3] [3]?? (Not crucial question) I'm curious about the SX internal structure of EEFlash and RAM. [/3] [3]- Are they different physical areas on one chip -or- are there multiple chips within the SX package (one being an EEFlash chip) ? [/3] [3]- 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.[/3] [3][/3] [3]Thanks.[/3] ---------- 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)