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

out of rom?

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



Joined: 21 Sep 2007
Posts: 2

View user's profile Send private message

out of rom?
PostPosted: Fri Sep 21, 2007 2:46 am     Reply with quote

hi
i have a problem with 16f877A -8K word flash memory.

in my code, i got out of rom error while it used only about %42 of rom.

so i wrote a simple code how much i could use all of the rom.


#include <16F877A.h>

#fuses HS,NOWDT,NOPROTECT,NOLVP
#use delay(clock=4000000)

float a=999999;
float b=1.1;

void main()
{
a=a/b;
a=a/b;
a=a/b;
.
.
.
.
a=a/b;
}

the number of a=a/b is 75 and rom usage is %27.
after I added a=a/b
and i got out or rom error.

do you have an idea how can i achieve this problem?
Guest








PostPosted: Fri Sep 21, 2007 2:53 am     Reply with quote

How about searching the forum, before asking?...
Or even reading the manual?...
You are not running out of ROM as such, but running out of space in one 'segment'. A search on the forum, will find a full description, as well as what you can do about it. It is also detailed in the compiler manual.

Best Wishes
ss1903



Joined: 21 Sep 2007
Posts: 2

View user's profile Send private message

PostPosted: Fri Sep 21, 2007 4:12 am     Reply with quote

dear guest
thank for reply.
i examined compiler manual and it say you must use #separete before function. but in this code i didnt use function. there is only divison. i think this divison is built in function. so how can i use #separete in this state.
i've been searching the forum but yet i cant find the solution.
Ttelmah
Guest







PostPosted: Fri Sep 21, 2007 7:10 am     Reply with quote

You have to split your code up....

Best Wishes
rnielsen



Joined: 23 Sep 2003
Posts: 852
Location: Utah

View user's profile Send private message

PostPosted: Fri Sep 21, 2007 8:47 am     Reply with quote

Read this post:

http://www.ccsinfo.com/forum/viewtopic.php?t=30167&
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