Pages: 1 [2] 3   Go Down
Author Topic: Arduino clones with more RAM than Uno?  (Read 5836 times)
0 Members and 1 Guest are viewing this topic.
Tacoma, WA
Offline Offline
Full Member
***
Karma: 4
Posts: 192
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Check out this improved 1.0.2 IDE: http://arduino.cc/forum/index.php/topic,118440.0/topicseen.html
You'd think they'd roll those improvements into the new 1.5 IDE, but I guess not. Can lead a horse to water, can't make him drink....
Logged

Brian from Tacoma, WA
Arduino evangelist - since Dec, 2010.

United Kingdom
Offline Offline
Tesla Member
***
Karma: 227
Posts: 6637
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

That's probably the IDE that was referred to in the post I saw, not the 1.5 IDE!
Logged

Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

Tacoma, WA
Offline Offline
Full Member
***
Karma: 4
Posts: 192
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Well if the improvements don't make it into the final 1.5, I'm sure those guys will apply them to 1.5 afterwards, like they did with 1.0.2..
Logged

Brian from Tacoma, WA
Arduino evangelist - since Dec, 2010.

New York
Offline Offline
Sr. Member
****
Karma: 4
Posts: 380
xronosclock.com
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I used FreeRam function to test how much RAM is being used.
Running my clock sketch it shows from 1167 to 922 available (depending which menu I'm in).
However as soon as I enable Waveutil.h library it jumps down to 110 bytes. I'm not even playing audio at this point. So I don't think there's anything I can do to optimize it (I don't want to mess with WaveHC library) other than upgrade RAM smiley-sad
Logged

Xronos Clock - A talking arduino based alarm clock is now available. Check out xronosclock.com for pictures, source code, schematics, and purchasing info smiley

United Kingdom
Offline Offline
Tesla Member
***
Karma: 227
Posts: 6637
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

How about posting your clock sketch?
Logged

Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

New York
Offline Offline
Sr. Member
****
Karma: 4
Posts: 380
xronosclock.com
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

How about posting your clock sketch?
Ok smiley

* HT1632_clock_9.rar (17.41 KB - downloaded 10 times.)
Logged

Xronos Clock - A talking arduino based alarm clock is now available. Check out xronosclock.com for pictures, source code, schematics, and purchasing info smiley

Dallas, TX USA
Offline Offline
Faraday Member
**
Karma: 70
Posts: 2745
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Look at the nm output.
You can see what is eating up your space.


The wavehc stuff appears to be commented out however
a a quick looks show two 512 byte buffers in wevehc.

Another big guy is a 256 byte shadow buffer for the graphics.
That is quite a bit just right there.
Total BSS without wavehc is currently 0x2c8 which is 35% of your
total RAM. Add in 0x400 for the wavehc buffer1 and buffer2 buffers and you up to 0x6c8
which only leaves 0x138 for everything else including stack  and
I'm sure there are other variables in the library as well too.

There are several variables in the main sketch that look like they are not
changing and could (should) be declared const to eliminate some storage there.

The wavehc does run on m168 and will automatically drop the buffers down to 256 if on
that part. There are some other limitations that come with that (bit rate etc) but you
may want look in the wavehc header and see if you can get away with using the smaller
buffers by patching the defines like they are on a m168.

Best thing is to run nm and objdump to start looking at where the memory is going
and see if there is anything easy (like putting the wavehc in m168 mode) that can be done
to save RAM.

--- bill


* bss.txt (2.25 KB - downloaded 16 times.)
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 548
Posts: 27386
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

Duemilanove-style 1284 is not hard to make.

http://www.crossroadsfencing.com/BobuinoRev17/1284_thruhole2.JPG
I sell bare boards for $5 shipped to US locations, scrounge  the parts  you need or pick up for ~$15 at mouser.
On board (MIKROE483) or off board USB/Serial (FTDI Cable or similar) supported too.
PL here www.crossroadsfencing.com/BobuinoRev17/
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.

New York
Offline Offline
Sr. Member
****
Karma: 4
Posts: 380
xronosclock.com
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset


The wavehc stuff appears to be commented out however
a a quick looks show two 512 byte buffers in wevehc.

Another big guy is a 256 byte shadow buffer for the graphics.
That is quite a bit just right there.
Total BSS without wavehc is currently 0x2c8 which is 35% of your
total RAM. Add in 0x400 for the wavehc buffer1 and buffer2 buffers and you up to 0x6c8
which only leaves 0x138 for everything else including stack  and
I'm sure there are other variables in the library as well too.

There are several variables in the main sketch that look like they are not
changing and could (should) be declared const to eliminate some storage there.

The wavehc does run on m168 and will automatically drop the buffers down to 256 if on
that part. There are some other limitations that come with that (bit rate etc) but you
may want look in the wavehc header and see if you can get away with using the smaller
buffers by patching the defines like they are on a m168.

Best thing is to run nm and objdump to start looking at where the memory is going
and see if there is anything easy (like putting the wavehc in m168 mode) that can be done
to save RAM.

--- bill


Wow thank you! I'll give it a try. I also had no idea that declaring consts instead of variables will save ram.
Duemilanove-style 1284 is not hard to make.
I sell bare boards for $5 shipped to US locations, scrounge  the parts  you need or pick up for ~$15 at mouser.
On board (MIKROE483) or off board USB/Serial (FTDI Cable or similar) supported too.
PL here www.crossroadsfencing.com/BobuinoRev17/
That's a beauty!  I think I'll order a PCB from you. Will it work with 644p? I had hard time finding 1284, they seem to be out of stock almost everywhere. I did request 644p sample from Amtel and it's on it's way.
Logged

Xronos Clock - A talking arduino based alarm clock is now available. Check out xronosclock.com for pictures, source code, schematics, and purchasing info smiley

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17303
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Will it work with 644p?

Yes, 1284p and 644p in DIP at least have same pin out.

Lefty
Logged

Greenville, IL
Offline Offline
Edison Member
*
Karma: 15
Posts: 1330
Warning Novice on board! 0 to 1 chance of errors!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

@Bratan

  CrossRoads could probably hook you up with a chip. I have purchased several of CrossRoads PCBs and one of his Bobuinos that is loaded with features! CrossRoads does some great work!

  Also, on the subject of the 1284, I am using one of CrossRoads SMT 1284 boards to make a 20MHz version for fun. Someone recently made a bootloader so, that the chip will work properly at the higher frequency. I am considering putting a socket for the crystal to sit in so that I can try other frequencies. The socket will be easy to remove later if I do not like it.
Logged


Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 548
Posts: 27386
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

Thanks cyclegadget smiley
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.

United Kingdom
Offline Offline
Tesla Member
***
Karma: 227
Posts: 6637
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I took a look at your sketch. Which DS1307 library are you using?

As well as changing the variables that represent unchanging data (e.g. pin numbers) to const, another easy win is to replace Serial.println("text") in setup() by Serial.println(F("text")).

I was unable to find monthShortStr(), but I suspect the month strings are another candidate for moving into PROGMEM.

Table divider[12] occupies RAM but appears to be unused.

Variable tempString should be local to the function in which it is used, like timeString. Similarly for tempChar.
Logged

Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

vermont
Offline Offline
Sr. Member
****
Karma: 8
Posts: 316
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Duemilanove-style 1284 is not hard to make.
I sell bare boards for $5 shipped to US locations, scrounge  the parts  you need or pick up for ~$15 at mouser.
On board (MIKROE483) or off board USB/Serial (FTDI Cable or similar) supported too.

i had a similar requirement for large ram and was given one of your m1284 boards. im very impressed with the design. do you have a link to a bootloader? also can you tell me what avrdude command line would be used to load a small test program to that with a com5 dongle?
Logged

Greenville, IL
Offline Offline
Edison Member
*
Karma: 15
Posts: 1330
Warning Novice on board! 0 to 1 chance of errors!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


 Here is the thread about the 20MHz bootloader for the 1284P. I have not tested it yet.  http://arduino.cc/forum/index.php/topic,128604.msg968632.html#msg968632

Here is the bootloader I use for boards from CrossRoads https://github.com/maniacbug/mighty-1284p

By the way, the board has to be selected as Bobuino or your pins will not match. There are other 1284 variants that have different pin mapping. The problem may apply to the first link I gave you.
Logged


Pages: 1 [2] 3   Go Up
Jump to: