I have a system consisting of a board Arduino Mega, shelled with LCD display and IL9341 library. The system operates with various sensor modules at an experimental level. I have practically exhausted the memory capacity of the Arduino Mega board. I was wondering if it would not be possible to use two boards Arduino Mega with just one LCD display in order to use the second Arduino as a memory expansion. Can this be done? ... Has this been done before? ... Can anyone tell me any reference about this possibility?
Thanks for any help.
The Mega has a traditional (parallel) memory interface, like used in the 8085, with one port for the lower address and data byte, and one port for the higher 8 address bits. More ports can be used to add further address bits. Also serial memory (EEPROM, flash...) with SPI or I2C interface can be used to add more random access memory, or SD cards for bulk storage.
Langoni:
I have a system consisting of a board Arduino Mega, shelled with LCD display and IL9341 library.
And you want more RAM. The 2560 chip can directly address external SRAM above 8K (the 1st 8K addresses are internal SRAM) through the double row header across the back of the board which is where some displays (TFT for 1) get plugged.
I bought a QuadRam card from Rugged Circuits years ago and it works except after the TFT got bought, it's in storage now. The memory card has 512K SRAM as 8 banks of 64K. But you only get to address the upper 56K of any bank... you still get 448K total heap space, the internal 8K serves as dedicated stack space. And btw, there's 256K flash and 2K EEPROM to fill out the system memory, LOL! Last I looked the price is still around $25 plus shipping.
Mega2560 has SPI and 4 serial ports, each one capable of full speed master mode SPI or very high speed serial.
With all that, there's only 1 AVR core.
You could go parallel but the effort deserves ARM chips rather than AVR. Get ARMs with 4+ serial ports and look up Transputer to see how they worked as nodes. Transputer parallel processing language is named Occam. They were very efficient for single-core technology which AVR and ARM are. Occam has terms for parallel processing with nodes, those ideas could run on a 48 to 600MHz 32-bit ARM easier than a 16MHz 8-bit AVR.
If you hang 1+ 328's (about 25% cheaper than 328P) on an SPI bus to your Mega2560 you get 1+ extra cores for less than $2 each plus wiring and components you may already have, otherwise ask about how to shop.
If looking at different architectures, the Teensy and ESP32 should be mentioned. Both offer way more RAM, flash and processing power than the Mega. The Mega does have more I/O pins, though.
There's a Teensy3.x with FPU and 256K RAM and onboard SD slot. The Teensy4 doesn't have FPU but runs 600MHz with massive SRAM and flash, no onboard SD but price is pretty low and the size is smaller.
I have been advised that ARM pins don't work quite so easy as AVR pins and they are less "robust". AVR pins are more hobbyist friendly.
Use AVRs to keep up with things at the millisecond level, to stream and process at over 115200 baud, all depending on the job -- Uno can perform watch a button task and blink led task at 66KHz, the process task read button presses and changed the blink rate. All were very light tasks made in even smaller steps in turn with the smaller steps of the other tasks resulting in virtual parallel programming without an OS. The basic techniques were around in the 70's from docs I've read, probably older since Charles Moore was doing FFT to aim big telescopes on a 1959 computer. He used lookup tables with pre-calculated values for speed where the hardware was oxcart slow.