Pages: [1]   Go Down
Author Topic: SRAM Expansion Shield for Arduino Mega  (Read 7071 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 4
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

lagrangianpoint.net is pleased to announce the new SRAM Expansion Shield for Arduino Mega.



Have you been developing a project that required a lot of SRAM and blown the heap/stack? Maybe you just to prefer to write applications in C++ and also use the STL ports available out there. Those "unexplained" errors are not easy to debug! This shield could therefore be the solution to your needs.

Features include:
  • 448 kB SRAM available through the Arduino Mega extended digital interface.
  • Based on the design by Andy Brown, supported by the xmem software library.
  • Available in both kit (absolutely everything supplied) and PCB versions.

Check out the product page for more information and how to purchase. There's a Tech Note available explaining some of the background plus links to Andy Brown's original implementation.
Logged

Czech Republic
Offline Offline
Sr. Member
****
Karma: 4
Posts: 312
Absolute Beginner, yet.
Newbie in Arduino
since May 2013
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I just ordered one piece and already I'm looking forward to it!
Logged

Arduino Uno R3, Arduino Mega 2560 R3, Ethermega (R3), and some Ethernet Shields (R3), Chronodots, TMP36 sensors, DS18B20 sensors, LCDs/TFTs, RS232C to learn and play...

Global Moderator
Netherlands
Offline Offline
Shannon Member
*****
Karma: 216
Posts: 13664
In theory there is no difference between theory and practice, however in practice there are many...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Do you have an example how to address this extra memory?

e.g. if I want to fill an array of 65 000 integers with analog samples from analogRead(A0);

Logged

Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 533
Posts: 26941
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

How's that compare to the Rugged Circuits SRAM shields?
http://www.ruggedcircuits.com/html/quadram.html
http://www.ruggedcircuits.com/html/megaram.html
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Offline Offline
Edison Member
*
Karma: 8
Posts: 1341
If you're not living on the Edge, you're taking up too much space!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Rugged Circuits is cheaper
Logged

If you fall... I'll be there for you!
-Floor

Skype Brighteyes3333
(262) 696-9619

Czech Republic
Offline Offline
Sr. Member
****
Karma: 4
Posts: 312
Absolute Beginner, yet.
Newbie in Arduino
since May 2013
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I just ordered one piece and already I'm looking forward to it!
So, my kit is now complete (many thanks to EverMAX s.r.o. for soldering SMD parts!!!) and now comes the time to test the expansion.

*** EDIT ***
But first problem is here:
under IDE 1.5.2 adding
#include "xmem.h"
causes multiple definition of `malloc'
As a beginner I am not able to solve this problem.

*** under IDE 1.0.5, 1.5.3 and 1.5.4 compilation passes without errors ***

And second question is:
how to print current size of unused memory (free space for call stack and free space for heap)

And last question is:
Calling xmem::begin(true); allocates memory like that?


« Last Edit: September 07, 2013, 02:13:17 am by K5CZ » Logged

Arduino Uno R3, Arduino Mega 2560 R3, Ethermega (R3), and some Ethernet Shields (R3), Chronodots, TMP36 sensors, DS18B20 sensors, LCDs/TFTs, RS232C to learn and play...

Czech Republic
Offline Offline
Sr. Member
****
Karma: 4
Posts: 312
Absolute Beginner, yet.
Newbie in Arduino
since May 2013
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

AVR Map layout of RAM discovered.
Logged

Arduino Uno R3, Arduino Mega 2560 R3, Ethermega (R3), and some Ethernet Shields (R3), Chronodots, TMP36 sensors, DS18B20 sensors, LCDs/TFTs, RS232C to learn and play...

Rapa Nui
Offline Offline
Edison Member
*
Karma: 60
Posts: 2071
Pukao hats cleaning services
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

There is a functionality in at least 1 compiler I am aware of called "addressmod"
Quote
Part of the IEEE Embedded C standard (ISO/IEC TR 18037), addressmod allows you to create custom qualifiers to create variables in any kind of memory device. The identifier can be used with any data types, including structures, unions, arrays, and pointers.
Maybe some compiler experts/gurus may implement that into the compiler, so we can use an external memory space fully transparently within the C code then.
Logged

Ayer, Massachusetts, USA
Offline Offline
Edison Member
*
Karma: 54
Posts: 1847
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

There is a functionality in at least 1 compiler I am aware of called "addressmod"
Quote
Part of the IEEE Embedded C standard (ISO/IEC TR 18037), addressmod allows you to create custom qualifiers to create variables in any kind of memory device. The identifier can be used with any data types, including structures, unions, arrays, and pointers.
Maybe some compiler experts/gurus may implement that into the compiler, so we can use an external memory space fully transparently within the C code then.
Infrastructure done.  smiley smiley-evil

Well, I and two other people implemented the machine independent support in the GCC 4.5 time frame for the Cell processor. Shortly afterwards the AVR compiler switched to use it for PROGMEM.  I imagine if the AVR developer has the cycles to do it, it could be added for the external SRAM.

Of course given, the compiler shipped with current Arduino IDE's is still 4.3.2, it is kind of a moot point for most Arduino users.
Logged

Rapa Nui
Offline Offline
Edison Member
*
Karma: 60
Posts: 2071
Pukao hats cleaning services
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Interesting! For example the compiler I know does it in following manner (or it claims it works such way):
Code:
..
_read - an user defined function for reading n-bytes from an external memory
_write - an user defined function for writing n-bytes into an external memory
..
addressmod(MY_EXT_RAM, _read, _write, 0x000000, 0x3FFFFF);
..
MY_EXT_RAM  long my_array_1[30000];
MY_EXT_RAM  char my_array_2[100000];
MY_EXT_RAM  float x,y,z;
..
I did some simple tests in past (with an external SPI FRAM) and it worked somehow. The var access times depend on _read/_write functions to the hw  (ie. SPI, or bitbanging, etc..).
« Last Edit: November 13, 2013, 02:19:35 pm by pito » Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 32
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


Does anyone know of any Mega2560 RAM expansion boards still available,  both the rugged circuits board ("on backorder indefinitely") and the lagrangianpoint.net board ("out of stock")  are currently unavailable. 

I'm looking for  a small number to boards (<10) and just need around 64K, but will take bigger ones if need be.  I guess failing that, i'll do a bit of a re-write and port to the Due...


MarkB
Logged

Pages: [1]   Go Up
Jump to: