Hi, I want to add external 1k RAM to arduino. Does anyone know if it´s possible? Can I acess this RAM normally?
Check out this page on the site's Playground area:
http://www.arduino.cc/playground/Main/InterfacingWithHardware#Storage
I'll probably try the USB memory stick option soon, but not too soon.
...after reading another forum posting, though, I will probably use this instead:
This falls under I2C EEPROM in the last URL I posted.
You can add non-volatile ram as per eustace's suggestion above, but access is much slower and more awkward then the arduino's internal RAM. Can you say a little more about how your sketch wants to use the extra RAM.
well I need extra RAM memory, if possible, because 1K is too little. Reading malloc documentation and memory space division, it appears to be possible to install extra RAM memory so that I can map it to atmega memory space.
Huh? There is no external address bus to support RAM outside the chip. Using the data pins to address external memory is very slow.
I would guess that the malloc docs say that it can access external ram if physically available but I don't think its actually possible on the arduino chips.
I would be happily surprised to be proved wrong though.
Anyway, I think a read a post recently that there is a new chip that will be supported that has more RAM. You may want to have a search for more on this.
well I need extra RAM memory, if possible, because 1K is too little. Reading malloc documentation and memory space division, it appears to be possible to install extra RAM memory so that I can map it to atmega memory space.
Keep in mind that the avr libc works with a wide range of AVR microcontrollers so there are features in it that won't be available on all of them (some of the ATTiny chips have no RAM at all).
In terms of being able to use extra externally addressable RAM my understanding is that neither the ATMega8 or ATMega168 can make use of externally addressable RAM in a standard manner*. I believe the ATMega128 is the first chip in this series that can--but I'm not 100% positive--and that's not officially supported for Arduino yet.
As someone asks elsewhere, do you know you'll need more RAM or are you just assuming you'll need more 'cos it doesn't sound like much?
--Phil.
- I used weasel words here because in theory you could write code to access external SRAM (for example) but it certainly wouldn't be using the standard routines.
I got a big problem, actually. I'm designing a datalog system, I have 1 month to have it done but it seems now that 1K is not enough. Is there any chip that is compatible with arduino decimila board that I could just replace atmega128?
IF you are just logging data (not really a RAM application), look at the Vinculum VDIP modules.
A couple of hints: don't ignore serial handshaking if you feed data very fast, and SPI mode is a pain since it doesn't use 8 bit transfers.
I think another VDIP user put together an example or tutorial somewhere on the arduino site.
-j
I'm designing a datalog system, I have 1 month to have it done but it seems now that 1K is not enough.
As someone else mentioned, more RAM wouldn't necessary be appropriate for your task--you would lose the stored data any time you lost power.
If you don't want to send the data to a computer to save it (e.g. via a serial, network or wireless link) then your options are using some sort of EEPROM (or non-volative RAM), something like the VDIP module mentioned above or trying an SD card or something. The last two options would have the advantage that you could use a standard computer to read the data from the cards.
However, my impression from the forums that getting the VDIP modules working isn't straight forward.
I would suggest trying an SPI or i2c EEPROM for storage--although I'm not sure what libraries (if any) are available for that at present. You could get started with the 512 Byte EEPROM on board the ATMega168 using the standard Arduino EEPROM library.
If you use EEPROM you would need to provide a way for the Arduino to upload the data to a computer when connected via serial--but the computer wouldn't need to be permanently connected.
--Phil.
Hi,
When you say "datalogging and EEPROM" keep in mind that all of the EEPROMs are limited in the number of write-erase-cycles. Usuallly the datasheet gives information on this says. The allowed cycles run from 10.000 to 1.000.000.
Take that into consideration if you rewrite the data on the EPROM very often.
Eberhard
Please don't get me wrong, but I'm not stupid, I know what is RAM / ROM memory and I need RAM. I've already bought a module of extra E2PROM for storage of data logged. I need morde RAM beacause there are too much variables in the main program to handle everything and, therefore, 1K will not be enough.
I think you all misunderstood me. My system needs more RAM beacuse it has lots of work to do: LCD handling, KEYBOARD handling, SERIAL USB handling, TOUCHSCREEN handling, MEMORY CARD INTERFACE handling, and, of course, datalogging handling.
I think I'll buy extra serial RAM and design some functions to acess it.
RAM in that instance would be more like swap on a computer.
Each of your routines would have to fetch its variables from the ram, run the code and then send the variables back before the next chunk of code executes.
Not really ideal.
I'd just go dual core.
Use two processors (or more) and split the load.
That way your circuit will be more responsive, it will be easier to debug and you wont have to mess around with using external ram.
I got confused by the same chart for avr-libc. The long story short is that the atmega168 does not support the external ram they are talking about. Other AVR based chips do.
If you need more ram, the best thing you can do is get an atmega328 pre-programmed with an arduino boot loader (sparkfun, adafruit both have them.) That will give you 2 k of ram. (as well as more eeprom space and flash space for your program.)
There are some tricks you can do to make better use of the ram you do have, including the PROGMEM directive and using the inline keyword on function calls (to reduce stack usage without losing clarity of the code.)
Or get an Arduino Mega board, it has 8K of ram.
Lefty
I like that answer even better.
This is an old topic -- I only responded so that if someone else started searching for arduino and external memory, they could become less confused.
The Mega looks nice, but I am going to wait for one that comes with a board that has pre-prepped room for RS232 to TTL-RS232 converters and 9 pin D-sub connectors, so it is easy to attach external serial devices to the extra USARTs on the processor.