Pages: [1]   Go Down
Author Topic: Increase flash memory Arduino UNO  (Read 2178 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 7
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi everybody,
I have an arduino UNO and  I've written a code more than 32Kb that Arduino have on his flash memory, I've buyed an arduino ethernet shield wich has a memory extender for micro SD cards, is there a way to increase it's 32 Kb or another method in order to run my code wich is greater than 32 Kb on Arduino UNO ?
Claudio
Logged

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

It isn't really possible with an Uno, since I don't believe it has any way of extending program memory.  If you have filled up your program memory with strings and read-only data using PROGMEM, you could move these to using a micro-SD card, and read in the values when you need them, or use a i2c/spi memory expansion chip instead of the micro-Sd card.  You would have to restructure the program, and move even more out to external memory, as the libraries to access these devices will take space.

A much simpler solution is to use a Mega 2560, which has 256K of program memory, instead of 32K (and 8K of SRAM memory instead of 2K).

Or if you can run your devices at 3.3v instead of 5v, the Teensy 3.1 (which uses an Arm processor instead of the AVR processors used in the Uno/Mega) also has 256K of program memory (and 64K of SRAM memory).  Similarly, the Arduino Due has 512K of program memory and 96K of SRAM.
Logged

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

many programs can be coded more efficiently, e.g. by removing all float math from it

Is you code (partial) reviewed to see if it can be optimized?
Logged

Rob Tillaart

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

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

Hi boys thanks for answers.
@MichaelMeissner  I'll consider moving to Mega 2560.

 @robtillaart:  I don't wanna be silly, but I'm a programmer and the code unfortunately can't be optimized more I have double-checked it.
Logged

ਪੰਜਾਬ
Offline Offline
Edison Member
*
Karma: 12
Posts: 1593
Another year! Alone! :(
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

You can use a serial SPI flash and the library is already there here >https://github.com/LowPowerLab/SPIFlash
Logged

"Real Men can Accomplish  Anything"
-  Website  
- skype : nishants5  

ਫ਼ਤੇਹ ਕਰੂਂ !

ਪੰਜਾਬ
Offline Offline
Edison Member
*
Karma: 12
Posts: 1593
Another year! Alone! :(
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Also you do not need to definitely upgrade to a ATmega2560 arduino that has over 200kb of flash rather than you can also go for ATmega1284/1280 based designs!  thats half the falsh memory soit means saving money if not much but yes saving that god damn hard earned bucks! or maybe go for ATmega644 etc.

Talk with CrossRoads a respected forum senior member you should try his boards ,they are dependable and comes in green and yellow colors!
Logged

"Real Men can Accomplish  Anything"
-  Website  
- skype : nishants5  

ਫ਼ਤੇਹ ਕਰੂਂ !

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

It isn't really possible with an Uno, since I don't believe it has any way of extending program memory.  If you have filled up your program memory with strings and read-only data using PROGMEM, you could move these to using a micro-SD card, and read in the values when you need them, or use a i2c/spi memory expansion chip instead of the micro-Sd card.  You would have to restructure the program, and move even more out to external memory, as the libraries to access these devices will take space.

A much simpler solution is to use a Mega 2560, which has 256K of program memory, instead of 32K (and 8K of SRAM memory instead of 2K).

Or if you can run your devices at 3.3v instead of 5v, the Teensy 3.1 (which uses an Arm processor instead of the AVR processors used in the Uno/Mega) also has 256K of program memory (and 64K of SRAM memory).  Similarly, the Arduino Due has 512K of program memory and 96K of SRAM.

Good day!
I have this kind of problem, i have sensors, and need some external space, so how can i connect micro SD card and use it? Thanks in advance for answer.
Logged

Pages: [1]   Go Up
Jump to: