View Full Version : Need more RAM

Thomas Garaio
10-27-2006, 09:34 PM
Hi there,

how can I address more main memory? Let's say, I would be happy to address 0.5megs instead of the 32kbytes? I am only software minded and have no idea, how to wire and address external ram (or flash). Goal: I would like to enhance the main program memory and the video buffer (to support VGA or even XGA).

thank you in advance for you help

-- Thomas

10-27-2006, 10:04 PM
I have hit at that same question several times and it is clear that .5megs is going to require some hardware support for now. In fact I changed my orignal project to one that is sort of an experimental board to work with external ram and build my original later after I have done a bit more homework.

However, SparkFun has several boards that can get you more ram using SPI/I2C and that is rather simple hardware to wire up. Just type "ram" in the search engine and you should get some great threads on what others have done.

Mike Green
10-28-2006, 02:12 AM
The way the Propeller is set up, you really have to consider external memory to be somewhat like a fast disk drive. In other words, it's really external. You can't just expand the memory of the Propeller itself. That said, it's really easy to attach either SPI or I2C serial external memory. There are standard I2C EEPROMs up to 128K x 8 each (Microchip 24LC1025) and you can attach up to 4 to a pair of pins for a total of 512K bytes. They're not fast enough for video, but can be used to store data or programs. They have the same repeat write limitations and slow write times (5ms) of any EEPROM. Ramtron makes an EEPROM replacement that is a bit faster and doesn't have the write limitations, but the largest is only 32K x 8. You can put 8 on a pair of pins for a maximum of 256K.

For video, you'd need to use a counter for the address register and can be initialized byte serially from the 8-bit data bus when it's not being used during the active scan line. This way, you could limit the I/O pins used to 12-16 and yet transfer a byte maybe every 200ns. It would be a close thing to get it to work and you'd have to use several synchronized cogs and ...

Thomas Garaio
10-28-2006, 04:29 AM
Thank you to all of you for your answers. Seems that I unterstood the architecture right: no support to directly address more main memory - neither internally nor externally.

Does anybody know, if parallax is working on new versions of the chip with more ram on it - or at least - with the ability to add more main memory using external ram? It doesn't make sense for me to ship an 8 cpu chip with vga/tv support, but almost no ram and: no possibility to add some externally... or is there no need of such on the market? Maybe I am the only one that seems, it should have more...

what are you mean?


Mike Green
10-28-2006, 05:49 AM
There have been some discussions here about what might be in a 2nd generation Propeller. More memory is certainly planned, but all internal. The cost (in chip area, power required) of bringing a memory bus off chip would be prohibitive. Other things planned include more speed (by going to fewer clocks per instruction). Keep in mind that the Propeller is pretty well max-ed out in speed currently in trying to do 512 x 384 VGA graphics. It can do 1024 x 768 VGA text by some really fancy work with font tables in the 2 cogs taking turns building scan lines. Even if there were enough memory to try 1024 x 768 VGA graphics, it's not clear the Propeller's quite fast enough.

The Hydra uses sprites rather than bitmapped graphics and the memory bandwidth requirements are different. Be sure to look at the Hydra Manual when it comes out (soon).

Thomas Garaio
10-30-2006, 03:40 AM
hi there, I checked SparkFun (thanks bambino) and found a SD-Card adapter (http://www.sparkfun.com/commerce/product_info.php?products_id=544). Actually, I have no idea, how to wire this to my propeller prototyping board. And: is there any spin-class, which is already done for reading/writing such through SPI? (After wiring, this would be the next task on my to do list.. http://forums.parallax.com/images/smilies/wink.gif)

Unfortunaly I am really "only" focused on software (compiler construction). Is there anybody who can help to give me some tips/tricks how to start with this project (wiring, creating an SPI based communication to/from an SD-card)?

Thank you http://forums.parallax.com/images/smilies/smile.gif

Mike, I did not yet found any further information about the availabilty of the Hydra system. Anyway, I am very interested and I keep my eyes on the forum entries http://forums.parallax.com/images/smilies/smile.gif

10-30-2006, 04:02 AM
See this thread for more info on SD/Propeller info http://forums.parallax.com/showthread.php?p=588024

Mike Green
10-30-2006, 04:10 AM
Look in the "Assembler Tricks for Beginners" sticky thread for the Propeller at the top of the thread list here for a high speed SPI example.

SPI usually involves 4 pins. There's a clock pin, an input data pin, an output data pin, and a select pin. The SPI routines deal either with the clock pin and the input pin (for SHIFTIN) or the clock pin and the output pin (for SHIFTOUT). The select pin is usually set HIGH (1) just before a data transfer and LOW (0) after the transfer and a transfer may involve more than one byte. Your program will have to deal with the select pin. Sometimes (depending on the device) the input pin and output pin can be the same I/O pin. Sometimes they have to be separate. The documentation for the device will usually discuss this. The documentation will also indicate which bit is sent/received first (least significant or most significant) and whether the I/O pins are to be sampled on the leading (low to high) edge of the clock or the trailing edge (high to low). The SPI routines need to know this.

The details of talking to the actual device, sending valid commands, and receiving data in a useful way are up to you. There are some examples in the Propeller Object Exchange you could look at (like for the DS1620).