Arduino clones with more RAM than Uno?

How about posting your clock sketch?

dc42:
How about posting your clock sketch?

Ok :slight_smile:

HT1632_clock_9.rar (17.4 KB)

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)

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 Cross Roads Electronics

bperrybap:
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.

CrossRoads:
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 Cross Roads Electronics

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.

Will it work with 644p?

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

Lefty

@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.

Thanks cyclegadget :slight_smile:

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.

CrossRoads:
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?

Here is the thread about the 20MHz bootloader for the 1284P. I have not tested it yet. atMega1284P-AU @ 20Mhz - #9 by cyclegadget - Microcontrollers - Arduino Forum

Here is the bootloader I use for boards from CrossRoads GitHub - maniacbug/mighty-1284p: Mighty 1284P Platform for Arduino

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.

thanks. im using the standard bobuino16mhz at the moment but both those links may prove useful. tom gave me a set of his customized bootloaders and while the m8 ones worked im having no luck with any of the m1284 ones. maybe for some of the reasons discussed in that thread. thanks again.

It works!!! I just tried it with Mega 2560 and it has enough RAM to run my clock and WaveShield!!! Mega 2560 was just a proof of concept, now I need to get it working on 644p (which just arrived). Thank you all for you suggestions!

I like your work and your display! The voice sounds pretty good too!

What is the distance between LEDs on the display? I am thinking about making one similar but, I need to know how far apart to put the LEDs to make it look nice like yours.

Those look like dual color 8x8 matrices.

cyclegadget:
I like your work and your display! The voice sounds pretty good too!

What is the distance between LEDs on the display? I am thinking about making one similar but, I need to know how far apart to put the LEDs to make it look nice like yours.

Thanks! :slight_smile:
I'm not sure about distance (probably around 2 mm), I'm actually using premade 32x16 bicolor board from Sure electronics (DE-DP14112). It has 8 3mm 8x8 Green-Red LED matrices and driven by HT1632c ICs so it needs just 4 wires to connect to arduino (plus 2 for power supply). Previously I tried making display with other 8x8 LED matrices but it proved a little challenging to drive them. You can build your own and drive it with MAX7219 (2 per matrix) if you are good with PCB making. Those LED matrices arrange nicely, just put them back to back (most of them have grooves that allows them to arranged tightly next to each other, almost like lego). I think it's more practical to use 8x8 LED matrices rather than making your own from separate LEDs, but of course it's up to you :slight_smile:
Bicolor 8x8 can be found for as low as $1 each on eBay, and 32x16 display costs a little over $30.
Sure's matricies in DE-DP14112 are also much smaller than other 3mm 8x8 I was able to find. I don't know if it's good or bad, it will give you more DPI resolution, but smaller display overall...
But if you are planning

It would be interesting to see if that could be made to work with the SimpleSDAudio library. That is now capable of up to (pseudo) 16 bit Stereo direct from 1-4 PWM pins and an SD Card adapter. The Wav shield could then be removed. I've used this library in 8 bit mono using a single pin and it sounded good enough for simple sound effects and voices. It ran some Red Dwarf and Stargate voice clips very well, just into a PC speaker input.

tack:
It would be interesting to see if that could be made to work with the SimpleSDAudio library. That is now capable of up to (pseudo) 16 bit Stereo direct from 1-4 PWM pins and an SD Card adapter. The Wav shield could then be removed. I've used this library in 8 bit mono using a single pin and it sounded good enough for simple sound effects and voices. It ran some Red Dwarf and Stargate voice clips very well, just into a PC speaker input.

Wow I never heard of this. Sounds amazing, I definitely give it a try. If I can get rid of wave shield it would be like a miracle. Thanks for the info!

@bratan and tack

I highly recommend the SimpleSDAudio library. You get good audio with minimal parts. I am working on a board which has buffers and an amplifying filter to improve audio further, but it is pretty good as it is.

I am porting the SimpleSDLibrary over to ChipKit compatible boards to hopefully take advantage of more powerful computation at a lower price point. I have a video of the preliminary port (which I refer to as BasicSDAudio, to distinguish from the pure Arduino version) here:

I am also editing a new ChipKit compatible board, the FubarinoSDt. It uses an 80MHz, 512k Flash, 32k RAM, 32bit PIC processor and has a microSD socket and native USB in a breadboard form factor. With built in SD, this board will prove very useful for audio projects. If I do decide to make them available for sale, $25 is the target price. Check it out:

-Thomas