Go to Post Starting projects is fun, easy, and exposes you to new things, but finishing them shows true character. - Greg McKaskle [more]
Home
Go Back   Chief Delphi > Old Forum Archives > 2000
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 23-06-2002, 23:07
archiver archiver is offline
Forum Archival System
#0047 (ChiefDelphi)
 
Join Date: May 2001
Location: Pontiac, MI
Posts: 21,214
archiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond repute
Out of RAM Space on Custom Program

Posted by Frank Wang.

Student on team #115, Monta Vista Robotics Team, from Monta Vista High School and NASA Ames and 3COM.

Posted on 2/10/2000 10:11 PM MST



Is any one else experiencing lack of RAM space on their custom program? We are wondering if there is a way to optimize our code so we can declare more variables. We used most of our electronic kit parts, and we lack variable space to control two more speed controllers.
__________________
This message was archived from an earlier forum system. Some information may have been left out. Start new discussion in the current forums, and refer back to these threads when necessary.
  #2   Spotlight this post!  
Unread 23-06-2002, 23:07
archiver archiver is offline
Forum Archival System
#0047 (ChiefDelphi)
 
Join Date: May 2001
Location: Pontiac, MI
Posts: 21,214
archiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond repute
Re: Out of RAM Space on Custom Program

Posted by Nate Smith.

Other on team #66, GM Powertrain/Willow Run HS, from Eastern Michigan University and GM Powertrain.

Posted on 2/10/2000 11:55 PM MST


In Reply to: Out of RAM Space on Custom Program posted by Frank Wang on 2/10/2000 10:11 PM MST:



: Is any one else experiencing lack of RAM space on their custom program? We are wondering if there is a way to optimize our code so we can declare more variables. We used most of our electronic kit parts, and we lack variable space to control two more speed controllers.

In an earlier version of our program, I removed some of the variables that I wasn't using(mainly the _wheel variables for the ports), in order to have room to declare more. Just be sure to remove all references to the variables, as well as setting the c_ values for those variables to 0...

Nate
__________________
This message was archived from an earlier forum system. Some information may have been left out. Start new discussion in the current forums, and refer back to these threads when necessary.
  #3   Spotlight this post!  
Unread 23-06-2002, 23:07
archiver archiver is offline
Forum Archival System
#0047 (ChiefDelphi)
 
Join Date: May 2001
Location: Pontiac, MI
Posts: 21,214
archiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond repute
Re: Out of RAM Space on Custom Program

Posted by Mike Gray.

Engineer on team HOT from Huron Valley Schools sponsored by GM Milford Proving Ground.

Posted on 2/11/2000 5:44 AM MST


In Reply to: Out of RAM Space on Custom Program posted by Frank Wang on 2/10/2000 10:11 PM MST:



: Is any one else experiencing lack of RAM space on their custom program? We are wondering if there is a way to optimize our code so we can declare more variables. We used most of our electronic kit parts, and we lack variable space to control two more speed controllers.

Here's a few possibilities, short of deleteing variables in the intialization routine:

1. Reuse local variables. If they don't need to be global, use them again in other routines.
2. Can some of your new variables be constants instead? Constants don't use any RAM.
3 Declare variables only as big as they truly need to be. If a variable value will never exceed 255, make
sure its declared as a byte variable. If all you need is a nibble or a bit, declare them respectively. In short, don't use a bigger bucket than you really need.
4. Use one of the other seven programs available on the SX. Pass variables from one program to another using the 'scratchpad RAM'. You will take a throughput hit, but its not that bad.


__________________
This message was archived from an earlier forum system. Some information may have been left out. Start new discussion in the current forums, and refer back to these threads when necessary.
  #4   Spotlight this post!  
Unread 23-06-2002, 23:07
archiver archiver is offline
Forum Archival System
#0047 (ChiefDelphi)
 
Join Date: May 2001
Location: Pontiac, MI
Posts: 21,214
archiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond repute
Re: Out of RAM Space on Custom Program

Posted by Mike Sperber.

Engineer on team #175, Buzz, from Enrico Fermi High School and UTC/Hamilton Sundstrand Space Systems.

Posted on 2/11/2000 6:00 AM MST


In Reply to: Out of RAM Space on Custom Program posted by Frank Wang on 2/10/2000 10:11 PM MST:



You could also look at the hardware side of things. See if there are some places where you could 'Y' 2 PWMs together.

Good Luck
-mike


__________________
This message was archived from an earlier forum system. Some information may have been left out. Start new discussion in the current forums, and refer back to these threads when necessary.
  #5   Spotlight this post!  
Unread 23-06-2002, 23:07
archiver archiver is offline
Forum Archival System
#0047 (ChiefDelphi)
 
Join Date: May 2001
Location: Pontiac, MI
Posts: 21,214
archiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond repute
The BS2SX has an extra 64 bytes of RAM

Posted by Innovation First, Inc.

Engineer on team #883 from Texas.

Posted on 2/11/2000 4:19 PM MST


In Reply to: Re: Out of RAM Space on Custom Program posted by Mike Sperber on 2/11/2000 6:00 AM MST:



The BS2SX chip in the Robot Controller has a 64 byte 'scratchpad' that you can use to store and retrieve variables from. This should help solve any RAM problems you have. The Parallax document 'The BASIC Stamp IIsx documentation v1.3' on the Parallax web site has the details on the new 'GET' and 'PUT' commands used to access the scratchpad.

http://www.parallaxinc.com/



__________________
This message was archived from an earlier forum system. Some information may have been left out. Start new discussion in the current forums, and refer back to these threads when necessary.
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
St. Louis anyone? Jeremy_Mc Regional Competitions 8 07-02-2003 12:06
Slightly humorous story about global warming & space explor. archiver 2001 3 24-06-2002 04:01
Ahh! Program trick confusing! archiver 2001 9 24-06-2002 02:26
Anyone looking for more program space? archiver 2001 13 24-06-2002 02:20
KSC Results archiver 2000 2 23-06-2002 22:19


All times are GMT -5. The time now is 14:47.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi