Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
04/28/10 00:56
Read: times


 
#175473 - Extending "efficient as possible"...
Responding to: ???'s previous message
To extend Andy's suggestion about reviewing your variable space usage and make it as efficient as possible - consider this -

You mention using C51. I will make the educated guess that you are referring to the Keil tool set. The Keil C51 compiler / linker tool set does an awesome job of efficiently overlaying the local variables used in functions and subroutines. You may very well get the best benefit in this regard for functions and subroutines contained within each single source code module. You should look carefully at how many global variables you are using and try to convert some of these and use as many local variables as possible. This scheme may be able to save you just enough to complete a project without having to change chips.

----------

When I start an 8052 type design that will be done in C coding I generally estimate required global variable space and then select a part that has sufficient onboard XRAM to meet that requirement. I also always use a part that has the full 256 bytes internal RAM. I will reserve the portion from 0xFF and on down for the stack and the space from just beyond the general purpose registers for use buy the C51 environment to lay in the local variable allocations. The only global variables I'll put into the internal RAM will be those that need to have very efficient timing access. Such requirements would be some variables used by interrupt routines or those that are accessed at high bandwidth.

Michael Karas


List of 6 messages in thread
TopicAuthorDate
Utilizing the SFR memory space for storing variables            01/01/70 00:00      
   Variables at absolute addresses            01/01/70 00:00      
      That wasn't the question            01/01/70 00:00      
         Definitely desperate measures            01/01/70 00:00      
   Not to be relied upon            01/01/70 00:00      
      Extending "efficient as possible"...            01/01/70 00:00      

Back to Subject List