LabVIEW for LEGO MINDSTORMS and LabVIEW for Education

cancel
Showing results for 
Search instead for 
Did you mean: 

64 kB RAM Expandable?

Hi Folks,

Day 4 of using the Mindstorms NXT in our course.  Downloaded two example programs to the NXT brick and set off to create our first custom application in class.

All excited... pressed the download button and received an Out of Memory error from the NXT.

No problem with deleting previous programs... but only room for 2 VERY limited example programs on board?

Anyone know the reason behind the decision to include such small amount of RAM? --- Is it user expandable?

Thanks,

-Bill  =]
0 Kudos
Message 1 of 4
(8,203 Views)
As far as I know, the memory on the NXT is not user-expandable.  You can remove some of files included in the default firmware, however, and create more space on your NXT.  For more information, check out the FIRST LEGO League site.  I'm surprised that your two "VERY limited example programs" did not fit.  I'd be curious to know how many blocks there are in your program, as well as the types of those blocks.

One correction to your post: the memory on the NXT is 256 KB RAM, not 64.  Approximately half of that (128 KB) is consumed by the default firmware, leaving the other half for user programs.
------
James Blair
NI R&D
0 Kudos
Message 2 of 4
(8,200 Views)

@James B. wrote:
As far as I know, the memory on the NXT is not user-expandable.  You can remove some of files included in the default firmware, however, and create more space on your NXT.  For more information, check out the FIRST LEGO League site.  I'm surprised that your two "VERY limited example programs" did not fit.  I'd be curious to know how many blocks there are in your program, as well as the types of those blocks.

One correction to your post: the memory on the NXT is 256 KB RAM, not 64.  Approximately half of that (128 KB) is consumed by the default firmware, leaving the other half for user programs.




Hi James... Thanks for your quick reply.

As far as the VERY limited example programs...

1) The full Tribot example program that moves forward until it touches the ball holder, closes the claws with a clap, backs up, turns around, and moves forward until the light sensor "sees" the black line of the playing field.

2) A "fun" program that:
a) says "Watch Out!"
b) display look left
c) display look right
d) display look forward
e) move forward until touch sensor actuated
f) display surprized face
g) say "OOPS!"
h) move backward for 2 seconds and stop
i) say "Sorry."
j) display look forward

Our third program that did not "fit" in the available memory is the beginning of a class project to create an adaptive cruise control application for the "Tribot".

a) Start program with an infinite loop (until user presses gray button on NXT)
b) query ultrasonic range sensor
c) if object < 30 cm stop motors and apply breaks
d) if object > 30 cm, actuate motors to move forward

The NXT software presented the Out of Memory error and listed the current objects and programs stored in memory. We erased the two programs described above, and removed all of the supporting sound files (lots of memory!).

The available memory then was reported to be 48 Kb with 12 Kb of other system files still on the NXT. A quick guess was that the total RAM available for user programs is 64 Kb (48 + 12 = 60... and round for precision errors)

Nxtasy.org reports the NXT ARM7 has 256 Kb Flash memory and 64 Kb RAM with about 128 Kb of the Flash available for files. I'm not sure why the NXT software reported so few Kb available. Perhaps cleaning out any default and demo programs shipped with the NXT brick would help.

Maybe I'm too used to using full-blown LabVIEW on an XP system with a GB of RAM and have to think more along the lines of embedded controls. It makes sense to wipe the NXT mem each time and only load the current program. You should see all of the unused chafe on my 60 GB hard drive... =]

Many thanks!

-Bill =]
0 Kudos
Message 3 of 4
(8,182 Views)
I think the sounds are your culprit.  Try deleting the sound blocks from your program, deleting the sound files from the NXT, and check available space again.
0 Kudos
Message 4 of 4
(8,172 Views)