If you need more storage and only need to retain data while the Arduino is powered, then adding RAM is a handy solution. The 23K256 (Datasheet - PDF) is 32k SRAM chip which uses an Spi interface. :
Version tested and working with Arduino IDE 1.0.5 and the latest SPI Library:
Below is the original version of the library, which requires the Spi library as a dependency. If you are running older (pre 0019) versions of Arduino, use this library. It has been tested against Arduino 0017 only:
Both versions of the library implement a class called SpiRAM, which provides a bunch of read/write methods. The 23k256 has three operating modes: Byte mode (r/w one byte at a time), Page mode (r/w in pages of 32 bytes), and Stream mode (r/w abitrary numbers of bytes). I've therefore written three sets of read/write functions, which prototype as follows:
The library instantiates an SpiRam object which can be used to access these methods.
The 23K256 runs at 3.3V so remember to power it from the 3.3V line of your Arduino (or voltage divide the 5V rail) and voltage divide the transmit lines from the Arduino (i.e. MOSI, Clock, and Chip Select).
Spi attached EEPROM chips look like they work in a very similar way to the 23K256, so it should be fairly easy to modify this library to work with EEPROMs.
SpiRAM it's not for Mega2560, somebody for give the correction and give us an example.
Also see http://forum.arduino.cc/index.php?PHPSESSID=j5ogefr7mm7kii6235ltm3j7t0&topic=222386.0 for suggestions for improvement of this library.
Also see Spi RAM With Ethernet Shield.
SPI RAM is one of many kinds of storage mentioned in InterfacingWithHardware.