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

bogus out of ram error

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



Joined: 13 Nov 2005
Posts: 4

View user's profile Send private message Send e-mail

bogus out of ram error
PostPosted: Sun Feb 26, 2006 10:21 pm     Reply with quote

Hi there,

I'm using PCWH 3.241. I have a program which compiles OK for the 16F874A. It reports 41% ROM, 68-72% RAM.

If I try and compile for the 16F877 (more ram and flash), I get a "Not enough ram for all variables" message

If I look at the 16F877 in the device editor, it appears to use all the ram in the chip.

Is this a known quirk? I can post the source code - is there an option for attaching a file to these posts?

Many thanks,
Steve Krenek
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Sun Feb 26, 2006 10:35 pm     Reply with quote

Add the line shown in bold below:
Quote:

#include <16F877.H>
#device *=16
#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);
}
SteveK



Joined: 13 Nov 2005
Posts: 4

View user's profile Send private message Send e-mail

PostPosted: Sun Feb 26, 2006 10:46 pm     Reply with quote

Works a treat!

Many thanks. Er... is this something that should be highlighted in the documentation somewhere?

Steve
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Sun Feb 26, 2006 10:53 pm     Reply with quote

The "out of ram" question gets asked all the time on here.

CCS has the answer in the documentation, but it's buried in the FAQ:
http://www.ccsinfo.com/faq/

See item #3 in this FAQ question:
Quote:

Memory

Why does the compiler show less RAM than there really is ?
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