Arduino memory shortage

Hello everyone

I'm not sure whether this is possible or not but here goes. Let say I've got a program that is 29 KB and my Arduino Uno's memory is full after this but I want to upload some additional features but I can't since the program memory is full.

Is it possible to interface the UNO to another flash memory chip to store your program and let the Uno read the program from the other flash memory chip on start-up?

Will this be overly complex as well? The reason for asking is that I'm busy with a shield for the UNO and would like to make it compatible with it and not just the Mega (Mega's memory would solve my problem). If it is going to be overly complex than I will have to remove some features to reduce the program size. Thanks in advance

As far as I know this is not possible. It's probably much easier to adapt your shield to be Mega compatible.

I thought as much. Thanks for the reply. If any one else knows of some additional info please feel free to share.

That's a very good question. I know the Mega is what you use if you know you need a lot of memory but I haven't heard of anyone trying to add PROGRAM MEMORY , just scratchpad memory or storing program data, like a 32k flash to store sensor data.

Will this be overly complex as well?

@Dirka:

I vote with pylon, but just wanted to give you this link which will be helpful in providing a clearer view of what you are running up against:

Ray

Added:
@raschemmel:
I suspect that this can be done but it may be on a uC basis. Anyway, the tool set says this:

6.16.1 AVR Named Address Spaces

On the AVR target, there are several address spaces that can be used in order to put read-only data into the flash memory and access that data by means of the special instructions LPM or ELPM needed to read from flash.

there are several address spaces that can be used in order to put read-only data into the flash memory and access that data by means of the special instructions LPM or ELPM needed to read from flash.

Have you tried it ?

@Dirka:

You may want to take a look at the mighty-1284P ... twice the SRAM of the Mega2560 but half the flash ... in a 40 Pin easy-to-use DIP. The core files are on the forum... just search. It is a great chip! Moderator CrossRoads even sells a great board for self-assembly (or assembled.)

Ray

Have you tried it ?

I'm a child of the '60's but that I have NOT tried!

Ray

You look like your from a lot further back than that !

I would recommend moving to MEGA 2560 R3. While you move to a new board, do some optimization. I've only personally made only a few projects that will nearly reach or exceed 32KB program space. They are very complex projects with several thousand lines of code and several included libraries. If your project is smaller, you might be wasting memory unknowingly. I know your project code is probably long, but post some of it for critique.

Ray,

I don't recommend using the load program memory or its extended version. Just use the pgm_read_byte, pgm_read_byte_far etc.

Hey Everyone

Thanks for all the feedback. I think that the Mega will be the most obvious solution. I will also try to refactor the code to optimize it but I'm afraid that it won't save too much space.

The message exceeds the maximum allowed length (9500 characters).

The code is 2839 lines of code which relates to 29,534 bytes which is all good and well but I'm trying to add calibration capabilities to it which will be another 13,844 bytes. I think that I'll remove the calibration feature for the Uno and than include it if you want to use it with a Mega.

I already have a Mega clone as well so I'll test it out once all the code is combined into a single sketch. The project is a solder reflow oven and you can go check out the progress over here: http://paladintech.wordpress.com/

Still a work in progress but I'm hoping to finish it soon, and by soon I mean within the next few months. Once done I will share all the files under a Github repository.