Shop OBEX P1 Docs P2 Docs Learn Events
Adding RAM, not EEPROM — Parallax Forums

Adding RAM, not EEPROM

A.C. fishingA.C. fishing Posts: 262
edited 2007-02-12 16:59 in Propeller 1
Hello. Would it be possible to add a lot more RAM(Not EEPROM) to the propellor? Could the propellor hook up to and use external RAM?
thanks,
ACfishing

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔

Somebody said...
-Never Underestimate the power of human stupidity.
·

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2007-02-11 16:52
    Yes and no. Search the forums for past discussions on this. AndreL is currently working on an SRAM expansion card for the Hydra for example. Majongg is also working on an external RAM. It is simply not possible to add addition RAM as an extension to the existing 32K of on-chip Hub (or Cog) RAM. Any external RAM still looks like I/O to the Propeller. The main issue is saving I/O pins since addressing the external RAM takes a lot of address lines. A couple of 8-bit latches could be used to hold up to a 24-bit address with an 8-bit bus used for the address bytes and read/write data transfers. You'd need a couple of control lines for a total maybe of 10-14 I/O pins used to access up to 16Mbytes. In assembly language, you could probably transfer a byte every 500ns.
  • A.C. fishingA.C. fishing Posts: 262
    edited 2007-02-11 17:19
    Thanks for your reply Mike Green.
    Another few questions:
    -How does Propellor Assembly differ from x86 Assembly?
    -Does the Spin interpreter just compile Spin code, or does it also completely compile Prop. Assembly into pure Machine Code?
    -If not, then does each cog's processor compile the Prop. Assembly directly?, or do they run on pure machine code and I'm missing something?
    thanks,
    ACfishing

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔

    Somebody said...
    -Never Underestimate the power of human stupidity.
    ·
  • Mike GreenMike Green Posts: 23,101
    edited 2007-02-11 17:32
    Propeller assembly is similar in concept to x86 assembly, but it is also very different. There are no registers in Propeller assembly since all cog memory locations are treated as registers. There's no stack and no stack pointer ... calls are done differently. Any instruction can be conditionally executed rather than needing a conditional branch.

    The Spin interpreter doesn't compile Spin code. The Propeller Tool includes a compiler that compiles Spin to byte codes and assembles Propeller assembly language into instructions (machine code / binary). The Spin interpreter is a program, written originally in assembly language that's stored in the Propeller's ROM and gets loaded into a cog to interpret Spin byte codes (which are stored in the main RAM (hub memory)). The Spin interpreter can copy an assembly language program (after it's assembled into binary instructions) into another cog (memory) for execution on its own using a COGNEW or COGINIT instruction.

    So, the Propeller Tool translates the Spin and assembly source programs into binary information which gets loaded into the Propeller's main (32K) RAM and optionally copied into an attached EEPROM. When the download completes, the Propeller starts up a copy of the Spin interpreter which begins interpreting the byte codes. These may cause some blocks of assembly instructions (in binary) to be loaded into other cogs and executed. They may also cause additional copies of the Spin interpreter to be loaded into other cogs which will also start interpreting byte codes at the same time.
  • A.C. fishingA.C. fishing Posts: 262
    edited 2007-02-11 17:43
    thanks for clearing up those issues,
    ACfishing

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔

    Somebody said...
    -Never Underestimate the power of human stupidity.
    ·
  • Graham StablerGraham Stabler Posts: 2,507
    edited 2007-02-11 21:33
  • mahjonggmahjongg Posts: 141
    edited 2007-02-12 16:59
    Also see this thread for my 256 KB RAM expansion that uses 10 I/O lines.

    http://forums.parallax.com/showthread.php?p=629266

    Mahjongg
Sign In or Register to comment.