Go Down

Topic: RAM RAM I need more RAM!! (Read 3913 times) previous topic - next topic

jimLee

Do I count up the bytes for structures? Never..

As for the variable sizes and stuff. 90% of this code is general purpose library files that I use all over the place. So I'd rather not create special case versions for this yet.

Now this 1284 thing. This -is- looking pretty tempting. Can I program it just like my little Uno? Tell me some more about this.

-jim lrr

GoForSmoke

I was looking at info on my Teensy++ and found that it can use 64k bytes of directly addressable external ram. It's an AT90USB1286. I am finding other AT90 chips able to use external ram and I see that the Arduino MEGA can also use external ram, Rugged Circuits has memory shields for them. Chances are that the 1284 can use it too.

Yes you should count bytes and be aware as you write your code. Even on a full PC. Fat code is why we need desktop supercomputers to run apps way slower than they should. On an MCU it's critical. Do you watch how high you hold your head in low places?

Nick Gammon on multitasking Arduinos:
1) http://gammon.com.au/blink
2) http://gammon.com.au/serial
3) http://gammon.com.au/interrupts

CrossRoads

Yes you can.  Install maniacbug's core files into the IDE, select Bobuino as the board type, and have more RAM, FLASH memory, IO, all ready to go.

https://github.com/maniacbug/mighty-1284p

I have 19 boards on hand still.
Reply #224 at the bottom of page 15 has the details
http://arduino.cc/forum/index.php/topic,80483.210.html

with a parts line in #313
http://arduino.cc/forum/index.php/topic,80483.300.html on page 21
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

jimLee

Cross roads, now I'm confused..

I thought you had a board, kinda' like the Uno with more RAM & goodies for about $80-ish. And my hope was I could select a different chip with my IDE, load my program and be done.

How close am I? What is this talk about raw PC boards and what is this github thing?

And, wasting RAM doesn't make code slow. Its poor algorithms that makes code slow. Unless, of course, the OS starts swapping to disk. Then your going to be slow..

-jim lee

GoForSmoke

OS wouldn't need to swap if the OS and programs fit. 800 lb gorillas tend to take up a lot of room to themselves as it is.
Nick Gammon on multitasking Arduinos:
1) http://gammon.com.au/blink
2) http://gammon.com.au/serial
3) http://gammon.com.au/interrupts

AWOL

Quote
And, wasting RAM doesn't make code slow.

It depends how you waste it.
"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

GoForSmoke

You can get a MEGA2560 and a Rugged Circuits 512k Quadram shield then try and waste 8 x 64k banks.

Or you can find out if a more suited approach can make your project work on less hardware. But with your attitude I think you will be blind to over half the possibilities and never able to cut the unnecessary parts out let alone come up with shortcuts.

Nick Gammon on multitasking Arduinos:
1) http://gammon.com.au/blink
2) http://gammon.com.au/serial
3) http://gammon.com.au/interrupts

CrossRoads

"I thought you had a board, kinda' like the Uno with more RAM & goodies for about $80-ish."

I have that too. You hadn't indicated any need for RTC, RS232, SD/uSD card tho.

No matter how you go '1284, you will need the maniac/github stuff for the 1284 support as the Arduino IDE does not support the 1284 as a 'native' chip yet; only the '168, '328, '1280, and '2560 I believe.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

jimLee

I got it working.

Clipped out the command processor with all its strings. It was for debugging anyway. Set the upper limit of the servos to 18 like you suggested.. Still crashed.

But, I noticed it always crashed at the same spot... Hmm.. Found a loop counter that was 0 to <= Some number as opposed to 0 to < some number and Vola! Everything worked!

Sorry if I came across as having a bad attitude, it wasn't meant that way. I'm just having all sorts of fun playing with this little gadget.

Yes, I do like wasting RAM.. RAM's like chocolate, never have enough!

-jim lee

smeezekitty


And, wasting RAM doesn't make code slow.

It may, since accessing more ram will take more time.
Quote


Yes, I do like wasting RAM.. RAM's like chocolate, never have enough!

I don't like wasting RAM and don't like chocolate  :P
Avoid throwing electronics out as you or someone else might need them for parts or use.
Solid state rectifiers are the only REAL rectifiers.
Resistors for LEDS!

Go Up