CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

NOT ENOUGH RAM

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
ccmcca
Guest







NOT ENOUGH RAM
PostPosted: Mon Oct 25, 2004 12:05 pm     Reply with quote

What i have to do with this error?
Thanks
SherpaDoug



Joined: 07 Sep 2003
Posts: 1640
Location: Cape Cod Mass USA

View user's profile Send private message

PostPosted: Mon Oct 25, 2004 1:17 pm     Reply with quote

1) See how much RAM your chip has.
2) See how much RAM all your variables and data structures take.
3) Allow a little for compiler scratchpad if you are using any complex lines of code.

If it doesn't fit you need to:
1) Use a bigger chip.
2) Use fewer variables, reuse variables, use shorts instead of ints, use smaller buffers etc.
3) Use simpled C lines so the compiled doesn't need so much scratchpad.
_________________
The search for better is endless. Instead simply find very good and get the job done.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Mon Oct 25, 2004 2:01 pm     Reply with quote

And, for most chips in the 16-series, with the PCM compiler you
can enable use of all RAM with the #device *=16 statement, as
shown below:

Code:
#include <16F877.H>
#device *=16     //  <== Add this line, at this exact location.
#fuses XT, NOWDT, NOPROTECT, BROWNOUT, PUT, NOLVP
#use delay(clock = 4000000)
#use rs232(baud=9600, xmit=PIN_C6, rcv=PIN_C7, ERRORS)

//==================================
void main()
{

while(1);
}
ccmcca
Guest







THANKS
PostPosted: Mon Oct 25, 2004 7:35 pm     Reply with quote

Eso era el problema amigos!!!!!!!!!!!!!!!!!!!!!!!!!!


THANKS!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Stephanfo



Joined: 28 Nov 2004
Posts: 5

View user's profile Send private message MSN Messenger

Thanks, soooooo much
PostPosted: Sun Dec 12, 2004 2:49 pm     Reply with quote

Hello,

I was looking for why I was out of memory with only half of used variable.
And I found this post.

I always asked me for the interest of this option, now I know Wink

Thanks a lot for your help

Stephanfo
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group