Go Down

Topic: Big EEPROM shield? (Read 8297 times) previous topic - next topic

skyjumper

Hi All...

I have been googling much of the afternoon, with no luck. Does anyone know of a sheild that can mount directly to an Arduino (without another shield) and has a lot of EEPROM, like a megabyte or more? I would like to get a lot of storage on the device at low cost and without consuming a lot of the processing power.


CrossRoads

Why not just wire up one of your own?
Atmel makes 8-pin DIP 1M parts with i2c interface
http://www.atmel.com/dyn/products/product_card.asp?part_id=4075&category_id=162&family_id=647&subfamily_id=724
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

zonedabone

Getting a sheild for that isn't going to happen unless you make it yourself. OPf course, if you want that storage and can use a breadboard, Atmel has EEPROMS up to 1 Megabit that use through holes. The best one for the arduino would be this one. It can use 5 volts and uses either i2c or 2 -wire-serial. It should work for your general needs, and will only use 2 pins. If you want more than that, you'll need to start using flash memory. Try this chip, but you'll have to get less than 3.6 volts to it somehow. (If you use usb, the 3.3v pin will work)

skyjumper

Thanks everyone! To answer the question about why I don't wire my own, well I am pretty good with software but when it comes to  hardware I'm pretty ignorant. That said, the 16 Mb chip would give me 2MByte storage and that's about perfect. As you said, it needs from 2.7VDC to 3.3VDC. My device will be fed with 12VDC and I had planned to use an Arduino that can accept 12VDC. I suppose I could put a 3VDC regulator on the board to feed this chip?

Also, I see it has an SPI interface. Is wireing this chip up as simple as connecting the SPI pins on the flash chip to the SPI pins on the Arduino board?

Once the hardware is written, do I need to code my own library to talk to it, or would I talk to it using NewSerial like any other serial device?

Thanks again...



CrossRoads

The arduino has dedicated SPI pins, that is built in hardware, for fast data transfers.
To talk to it, you do some commands like this:
Code: [Select]

  // start up SPI to talk to the MAX7221
  SPI.begin(); // nothing in () because we are the master
  pinMode(SS, OUTPUT);  // Slave Select for SPI  <--- Need this here before any SPI writes?

  //  MAX7221: write shutdown register 
  digitalWrite(SS,LOW);  // take the SS pin low to select the chip:
  SPI.transfer(SHUTDOWN_ADDRESS);  // select the Address,
  SPI.transfer(0x00);      // select the data, 0x00 = Outputs turned off
  digitalWrite(SS,HIGH);   // take the SS pin high to de-select the chip:
  // Serial.println("shutdown register, dislays off");

I didn't read the data sheet but it probably supports reads/writes in blocks of addresses.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

skyjumper

Yes the datasheet says it has blocks of addresses.

What does it mean to select and deselect the chip? Is SPI a kind of bus with things on it I have to turn on and off?

CrossRoads

#6
Feb 04, 2011, 06:57 am Last Edit: Feb 04, 2011, 07:01 am by CrossRoads Reason: 1
Yes - the part has a Chip Select line that you must control to talk to it. You start by taking it low, this enables data to go back and forth, and when done you bring it back high.
In my examples, I called it SlaveSelect, or SS.
If you  had multiple chips, you would wire a separate SS to each chip (from seperate arduino pins, or from pins on a shift regiser for example).
If instead you used the other Atmel 1MB chip, that uses a slightly different scheme, where the chip has some pins that you wire hi/lo and the chip does an address comparison to an address in the message to see if you are talking to it. That chip let you assign 1 of 4 addresses (00,01,10,11) so 4 chips could be used together.
Its commands would look like this:
Code: [Select]

 // start up I2C, uses Analog 5 for Clock, Analog 4 for data
 Wire.begin(); // nothing in () because we are the master


 //  write intensity10 register
 Wire.beginTransmission(COMMAND_ADDRESS); // defined in the datasheet
 Wire.send(INTENSITY10_ADDRESS);
 Wire.send(0xEE);  //  E = 15/16 (max)
 Wire.endTransmission();
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

DigitalJohnson

Which arduino are you using?

DJ
DigitalJohnson

skyjumper

Thanks guys, I just found this tutorial:

http://www.arduino.cc/en/Tutorial/SPIEEPROM

That answered many questions I had. So I guess some chips on a SPI are addressable while others are not.

As to which Arduino, I don't know yet. Something like this:

http://www.nkcelectronics.com/freeduino-serial-v20-board-kit-arduino-diecimila-compatib20.html

That one has the ATmega328P CPU and is powered by 12VDC. The thing I want to build will run where there are 12VDC readily available from a battery. I need a real RS232 port. Ideally it would be nice to have both an RS232 port and a USB port to talk to a PC but I have not yet found an Arduino that can do that.

Its also cheap, which is a huge plus. I need to produce these in quantities between 100 and 500 units over the next several years and no one will pay much for one.


skyjumper

Also, that tutorial was a great help. But, it did not discuss how to do page addressing. How do I tell the storage chip which page I want to write to or read from?

Thanks again, this is a great help!

liudr

If it helps to mention that my shield supports one EEPROM and one RTC. With additional wiring, the RTC socket can accommodate a second EEPROM. You just need to solder two additional wires. Then you get 2*1024MB, which is 256KB space. Here is a link:

http://liudr.wordpress.com/phi-1-shield/

If you want to know how to wire it to take two EEPROM chips, just PM me. I can write up a blog post with details.

DigitalJohnson

Why exactly do you need so much EEPROM, and have you checked out the new Mega2560?
DigitalJohnson

skyjumper

Well as someone pointed out, if I want about 2 megabytes of space I am better off with flash. A 2 MByte flash chip is about $1.60 quantity 1, and about $0.75 quantity 100. Its just for data logging. I'll write a windows app that can fetch the data off the Arduino.

I did look at the Mega2560. It has a lot of stuff I don't need and does not have any mass storage, although the hardware UART serial ports are nice. But it's $65 bucks! For $80 I can get an entire ARM board, complete with USB host ports, UART based serial, all running linux. I'm hoping to keep the per unit cost, including electronics, case, manual and packaging below about $60.00. 

CrossRoads

mega2560 is not production friendly if trying to fit a permanent design in a small space.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

russdx

#14
Feb 04, 2011, 05:21 pm Last Edit: Feb 04, 2011, 05:23 pm by russdx Reason: 1
http://www.robotshop.com/eu/asynclabs-flash-shield-for-arduino.html

2meg of storage on this dataflash chip

their is also a few pre written arduino library's written for this chip, so its pretty much plug and play!

Go Up