Adding External RAM : Where to begin?

I thought about adding external RAM to an LPC2148, but I have no idea how to go about this. Has anyone done this already? Looking at the Olimex LPC21xx boards, none of them seem to offer external RAM. Is this even possible?

The problem is that the LPC2148 does not have an external data bus. No doubt that you can put some external memory on it (no experience with it though). External memory is not natively supported, so you cannot execute code from external memory for example.

But if you need external RAM for storing data,

you can use for example a SPI or I2C EEprom or SPI FLash.

bertrik:
The problem is that the LPC2148 does not have an external data bus. No doubt that you can put some external memory on it (no experience with it though). External memory is not natively supported, so you cannot execute code from external memory for example.

Wow. 40k of RAM and no external bus? There goes that full-frame MPEG-4 video project, I guess :slight_smile:

I have an external SPI EEPROM hooked up to my LPC2148. I’m not running any code out of it right now, though. The model I’m using is a 25LC640 from Microchip (64k bits that is, or 8k bytes). I have the bigger version that I sampled from Microchip back home, and I think it’s 256k bits/32k bytes. You could always try external flash, which you can get in absolutely monstrous sizes. It won’t be the fastest thing in the world writing to it, though, as with my EEPROM.

If you’re gonna be doing stuff that needs external memory, I have used the Atmel AT91M55800 ARM7 chip which has an external memory bus (sort of a big brother to the SAM7 Atmels that SparkFun carries). Also, I think all of the ARM9 boards that Olimex has out have external RAM, plus some of the upper end LPC stuff (I think from the 2200 series and up…just missed it with the 2148) :wink: .

You may be able to find some serial RAM at Digikey or Mouser that you could strap to SPI1 and still roll around 30 Mbps (still not optimal but might get a little closer).

Well, I’m already hooked up to an SD card on SPI1. Didn’t think I could run actual code off it. I’m pretty new to this, so I’m not sure how I would get the uC to run code directly from external flash…

I’m pretty sure that you could theoretically load this code into RAM at a specific starting address and either call goto to that address or create a void function pointer to it and call it that way. At this point though, you’re getting to where you need an OS to manage all the code (handling loading more code from the SD card into RAM, function calls, etc.), so for your purposes you’re probably just better off putting all of the code on the on-chip flash and using some sort of external RAM/flash for your video frames, etc, assuming it’s fast enough.

And even then, if I need a stack larger than 40k, I’m screwed. So this doesn’t really solve my problem.

Why do you need such a large stack ???

Is it just to read the flash card ?

Problems such as yours often need a code rethink but it is rare that it is impossible.

All the best.

Sorry I just re read ALL the posts.

ARM designed the ARM926EJS with MPEG4 in mind. So maybe using a chip with this core may be better. I guess you will need one with external SDRAM too handle the data to such a Data and Compute intensive task.

Good Luck!