memory setup...

FORDFORD Posts: 221
edited 2006-02-27 - 03:06:27 in Propeller 1
I know I cant compare stamps and propellers really, but I would like to know in laymans terms what the difference will be in memory structure.
The bs2p has 8 slots of 2kb each and 124 bytes of RAM.

What are the figures for the propeller ?

Can the user do a write instruction into the spare program space on each cog for data storage ?

The·LC256 chip can be cascaded as mentioned somewhere else here.
Does the prop only use chip 0, or can its program size be increased by adding chips ?

Cheers,
Chris

Comments

  • Martin HebelMartin Hebel Posts: 1,221
    edited 2006-02-27 - 00:07:25
    When working with SPin (and not assembler) for your programming language, there is 32K which is shared by all 8 processors. Code, which is common to all as object files, will only be in memory once. Also, this 32K is used for variables.

    On reset, the 32K of the EEPROM is transfered to RAM and execution begins. You could come up with scenarios where a program loads new code into memory, but I think this would need to be in Assembler.

    -Martin

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Martin Hebel
    Perform a Survey of Electronic Technology Employers - Click here!
    Personal Links with plenty of BASIC Stamp info
    and SelmaWare Solutions - StampPlot - Graphical Data Acquisition and Control
  • Martin HebelMartin Hebel Posts: 1,221
    edited 2006-02-27 - 00:12:31
    Oh, btw, the Spin code can have global variables so that all have access to the same data or to pass data between the various processors.
    -Martin

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Martin Hebel
    Perform a Survey of Electronic Technology Employers - Click here!
    Personal Links with plenty of BASIC Stamp info
    and SelmaWare Solutions - StampPlot - Graphical Data Acquisition and Control
  • FORDFORD Posts: 221
    edited 2006-02-27 - 00:35:44
    Thanks Martin,
    So is it possible in spin, to just write data to an unused·program space location, such as· "write 10, 20" in pbasic ?

    Or should I be putting extra memory chips there for my data storage ( I normally store about 8 kbytes of data).
    ·
  • william chanwilliam chan Posts: 1,315
    edited 2006-02-27 - 00:49:52
    The 512 bytes of RAM for each COG is used to store code or data?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    www.fd.com.my
    www.mercedes.com.my
    There is no such thing as bad news.
  • Martin HebelMartin Hebel Posts: 1,221
    edited 2006-02-27 - 00:56:39
    Quote: So it is possible to write data in unused program space location such as "Write 10,20"?

    - Depends what you want to store. That instruction is used to store in EEPROM so it is non-volitile. For this you would need to connect an extrnal EEPROM (as large as you want) to put data into.

    - If you just want the data in volitile RAM (code space on Propeller), you'd most likely create an array
    VAR BYTE MyData[noparse][[/noparse]8000] and simply store in the array.

    The 512 bytes of RAM will either hold the Spin Interpreter for the programs in the shared 32K of RAM, or the Assembly program you or others write to go there.

    - Of course, always take this all with a grain of salt since I am not Parallax staff.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Martin Hebel
    Perform a Survey of Electronic Technology Employers - Click here!
    Personal Links with plenty of BASIC Stamp info
    and SelmaWare Solutions - StampPlot - Graphical Data Acquisition and Control
  • Tracy AllenTracy Allen Posts: 6,386
    edited 2006-02-27 - 01:26:16
    A couple of things occur to me with regard to eeprom.

    First is, most development boards or systems are going to have an eeprom avaialble, hanging off of p28 (scl) and p29 (sda). If a program does not use all 32kbytes of that eeprom, it would be fair game to use the rest of it for data storage. That data would be read into your propeller RAM along with the program code at bootup time.

    Second, the system eeprom a 24LC256, which can have 8 chips addressable on one i2c buss. The system eeprom addresses 000 chunk of 32k. (At least it does on the development board). So additional 24C256 could be added at the other 7 addresses for a total of 229376 bytes for data storage. Or, to keep it small, one 24LC515 has 64k bytes, organzed into two blocks. The addressing is virtually the same as the 24LC256, so the system would boot the first 32k, leaving the upper block of 32k free for nonvolatile data.

    I should add that reading and writing that memory will require I2C routines written in SPIN or Pasm. That is, like accessing external (with subroutines) as opposed to system eeprom (with READ/WRITE) on the Stamp.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tracy Allen
    www.emesystems.com

    Post Edited (Tracy Allen) : 2/27/2006 1:29:02 AM GMT
  • CJCJ Posts: 470
    edited 2006-02-27 - 01:39:25
    With the super-modular aproach that spin uses, you would only need one I2C routine with read and write methods, just include it as an object and away you go, almost as easy as using read/write on the stamp!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Who says you have to have knowledge to use it?

    I've killed a fly with my bare mind.
  • FORDFORD Posts: 221
    edited 2006-02-27 - 03:06:27
    Thanks people,

    I see what you mean there.

    I'll be storing data in external eeprom.

    Cheers,
    Chris
Sign In or Register to comment.