external memory

Hi,

My application generates small arrays of integers.

I want to be able to store those for later use (after power down). I do not want to use
the memory on the arduino.

Can anyone recommend the easiest way to add a small memory chip (4k bytes? 16k bytes?)
so that I can, as needed, copy the current array to memory for later recall.

I have no idea if this is easy or hard so feel free to tell me if it is a hard problem.

Thanks in advance.

I would have thought http://www.arduino.cc/en/Tutorial/SPIEEPROM would be a fine solution?

I think that may be just what I need - thanks!

For some reason it seemed like in my initial research I had ruled out out eeprom's but from the tutorial it looks like it would work great.

Where does the eeprom get the power to store the data? The types of devices I'm trying to copy usually have a battery that back's up the memory. What type of memory do you think that would be?

Thanks!

I2C EEPROMs are also a possibility.
Eg. AT24C256 from Atmel (256 kbyte EEPROM)

There's not too much code on the Arduino website about I2C EEPROM interfacing, but I could write my own. Maybe I'll post it on the wiki soon. If anyone is having the same issues as me looking for I2C EEPROM code, here's an excerpt of my code:

byte i2c_eeprom_read_byte( int deviceaddress, unsigned int eeaddress ) {
  byte rdata = 0xFF;
  Wire.beginTransmission(deviceaddress);
  Wire.send((int)(eeaddress >> 8)); // MSB
  Wire.send((int)(eeaddress & 0xFF)); // LSB
  Wire.endTransmission();
  Wire.requestFrom(deviceaddress,1);
  if (Wire.available()) rdata = Wire.receive();
  return rdata;
}

void i2c_eeprom_write_byte( int deviceaddress, unsigned int eeaddress, byte data ) {
  int rdata = data;
  Wire.beginTransmission(deviceaddress);
  Wire.send((int)(eeaddress >> 8)); // MSB
  Wire.send((int)(eeaddress & 0xFF)); // LSB
  Wire.send(rdata);
  Wire.endTransmission();
}

Where does the eeprom get the power to store the data?

EEPROM can store data without any power. The ATmegas used in arduino have 512 bytes of internal eeprom (separate from the normal data memory or flash program memory) that will also retain data without power; it wasn't clear whether you understood this when you said you didn't want to use the internal memory for your data...

The types of devices I'm trying to copy usually have a battery that back's up the memory. What type of memory do you think that would be?

Like the CMOS configuration memory in desktop computers, eh? Or sometimes piggybacked on some "clock" chips. Compared to EEPROM memory, this sort of battery-backed low-power memory typically has fewer restrictions on how often or in what order you can write it. For some time it was denser than EEPROM style memory, but these days you can get SPI EEPROMs of about a megabyte for low prices.

I'm getting nowhere with an 24C01A I2C eeprom from Microchip. I'm just not conversant with how this works enough to guess why it doesn't.

I2C EEPROMs are also a possibility.
Eg. AT24C256 from Atmel (256 kbyte EEPROM)

There's not too much code on the Arduino website about I2C EEPROM interfacing, but I could write my own. Maybe I'll post it on the wiki soon. If anyone is having the same issues as me looking for I2C EEPROM code, here's an excerpt of my code:

byte i2c_eeprom_read_byte( int deviceaddress, unsigned int eeaddress ) {

byte rdata = 0xFF;
 Wire.beginTransmission(deviceaddress);
 Wire.send((int)(eeaddress >> 8)); // MSB
 Wire.send((int)(eeaddress & 0xFF)); // LSB
 Wire.endTransmission();
 Wire.requestFrom(deviceaddress,1);
 if (Wire.available()) rdata = Wire.receive();
 return rdata;
}

void i2c_eeprom_write_byte( int deviceaddress, unsigned int eeaddress, byte data ) {
 int rdata = data;
 Wire.beginTransmission(deviceaddress);
 Wire.send((int)(eeaddress >> 8)); // MSB
 Wire.send((int)(eeaddress & 0xFF)); // LSB
 Wire.send(rdata);
 Wire.endTransmission();
}