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

USE THE 8k programe memory

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







USE THE 8k programe memory
PostPosted: Tue Apr 01, 2008 4:04 pm     Reply with quote

how can I use the full programe memory?? Crying or Very sad
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Tue Apr 01, 2008 4:18 pm     Reply with quote

Don't use the demo compiler.
http://www.ccsinfo.com/demopoll.php
Quote:

The demo compiler is licensed for 30 days and has a 2k program size limit.
wassim22
Guest







PostPosted: Tue Apr 01, 2008 4:40 pm     Reply with quote

if it's not a demo, does it exist some thing to do with my program to guarantee the use of 8k program memory
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Tue Apr 01, 2008 4:41 pm     Reply with quote

1. Post the PIC that you are using.

2. Post the CCS compiler version.

3. Post the how much ROM you are using.
WASSIM



Joined: 01 Apr 2008
Posts: 5

View user's profile Send private message MSN Messenger

PostPosted: Tue Apr 01, 2008 5:19 pm     Reply with quote

1-PIC16F877
2- CCS VERSION 4.057
3-ROM used: 2693 words (33%)
i need more,
thank you for your help
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Tue Apr 01, 2008 5:47 pm     Reply with quote

Do you get an error message when you compile, if you try to add
more lines of code ?
WASSIM



Joined: 01 Apr 2008
Posts: 5

View user's profile Send private message MSN Messenger

PostPosted: Sat Apr 05, 2008 2:27 am     Reply with quote

yes when I use more memory program a error message appear:" out of rom,the segment or the program is too large Main".
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Sat Apr 05, 2008 9:57 am     Reply with quote

Quote:
out of rom,the segment or the program is too large Main".

In CCS, a function can't be larger than a ROM page. For the 16F877,
a ROM page is 2048 words. The solution is to break up the code in
main() and put some of it into functions. Then call those functions from
main(). This will allow the compiler to put those functions into other
ROM segments, and you won't get the "out of rom" error anymore.
Example:
Code:

void func1(void)
{
// code
}

void func2(void)
{
// code
}

//====================
void main(void)
{
// Initial main code goes here.

// Put some of the main() code into these functions.
func1();
func2();
// or more.

// Other main code goes here.

while(1);
}
rnielsen



Joined: 23 Sep 2003
Posts: 852
Location: Utah

View user's profile Send private message

PostPosted: Mon Apr 07, 2008 8:55 am     Reply with quote

There have been several posts regarding this error. Do a search on 'out of rom' and you should find the answers you are looking for.

Ronald
WASSIM



Joined: 01 Apr 2008
Posts: 5

View user's profile Send private message MSN Messenger

PostPosted: Mon Apr 07, 2008 10:23 am     Reply with quote

also you must add #separate before the main function
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