External Memory.
G3ek4Evur
Posts: 10
Is it possible to add external memory to the propeller. Just more than 32K.
Comments
Do you have a language preference?
You can find it here: http://forums.parallax.com/showthread.php?129672-ZOG-GCC-C-C-Project-in-Google-Code-(propeller-zpu-vm)
Parallax will make a decision whether or not to fully support a faster GCC for Propeller very soon.
That said, there are several emulators that run on the Propeller that can use external memory for their emulated memory. For example, there's a Z80 emulator that can use 64K or more of external memory for the Z80 program and runs standard CP/M (and MP/M) roughly at the speed of the original hardware. There's also a C compiler (Catalina) that uses one of several "memory models" for execution of an interpretive code based on the Propeller's native instruction set, but modified to execute out of either the 32K of built-in Propeller memory or external SRAM memory of different kinds. There's a time penalty for this and using the 32K of shared Propeller memory (hub) gets you an execution time of maybe 200ns for a 32 bit instruction vs. 50ns natively executing from the 512 long word cog memory. Executing from extern SRAM costs more overhead, perhaps comparable to the overhead for Spin's interpretive code (closer to 1us).
You can complain about things not working out the way you want them or you can lay out your situation with details including commented source code and specific issues, what you've tried, what's worked and what hasn't, etc. and ask for advice.
PASM is necessary for some parts of any program, particularly those parts requiring high speed and/or precise timing. For most applications, if you use an object from the Object Exchange, the PASM portion of the object is already done for you. Examples include FullDuplexSerial, various TV and VGA drivers, Servo32, and others. Whether you will need to write PASM depends on what you need to do and whether there are already objects that will do the job for you.
If you are ok about using C89 then take a look at Catalina. There are lots of modules for the assembly already written, so you can talk to a keyboard, display, mouse, sd card etc from within C and not have to worry about the low level assembly drivers.
I'm writing a GUI for the propeller in C, and it started off within the propeller 32k but rapidly grew to needing external memory. I'm using a 512k chip and the program is just under 200k at present. When the 512k chip gets too small, I'll switch to jazzed's 32Mb ram chip solution.
So yes there are solutions here, but things are changing rapidly and not everything is totally easy to use. eg if you want to drive a servo, you might need to take an existing spin/pasm driver, strip out the spin part and rewrite it in C. I've done a few, and the more we do and share, the easier it gets.
How big is your program likely to get?
BTW: Catalina does not support C++.
I've modified Kye Dos to use with a touchscreen project. I was running out of memory but with Kye Dos I could launch different programs depending on the menu selection.
I think this is probably the easiest way of creating large "programs" on the Propeller. I also has limitations, one of which is not having all parts of a program available at once.
There are various Prop to Prop communication protocols based on the needed speed and the number of pins available.
BTW, I've found it helpful to have pull-up resistors on each line when using serial for Prop to Prop communication.
Make sure and read the "Spin Zone" articles by JonnyMac. They helped me learn PASM (I have not learned any other assembly language).
Duane