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

Need help moving from 16F877A to 18F458

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



Joined: 22 Oct 2006
Posts: 24

View user's profile Send private message

Need help moving from 16F877A to 18F458
PostPosted: Tue Mar 13, 2007 6:22 pm     Reply with quote

Hi I'm working on a project that I began on the 16F877A but the code soon became too large and I decided to move to the 18F458 because it has more ROM. The program I have now compiles perfectly but fills up the 16F to 99% ROM. I tried to switch it over to the 18F but it tells me that there isn't enough ROM on the 18F. How can this be if the 18F has significantly more ROM and it's the exact same program.

All I changed is the include statement at the beginning from 16F877A to 18F458.

Are there more changes I need to make?

I'm only using two CCP modules for PWM and 1 ADC port. The rest of my inputs are all digital I/O.

I would appreciate any help I can get because I don't know why this program would become so large just by using a different PIC.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Tue Mar 13, 2007 7:01 pm     Reply with quote

Are you using the CCS demo ?
totalnoob



Joined: 22 Oct 2006
Posts: 24

View user's profile Send private message

PostPosted: Tue Mar 13, 2007 7:07 pm     Reply with quote

Yes I'm using the demo, I picked that pic specifically because it was supported with the demo.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Tue Mar 13, 2007 7:10 pm     Reply with quote

According to the demo page, all supported devices are limited to 2K.
You don't gain anything by switching to the 18F device with the demo.
http://www.ccsinfo.com/content.php?page=compdemo
totalnoob



Joined: 22 Oct 2006
Posts: 24

View user's profile Send private message

PostPosted: Tue Mar 13, 2007 7:14 pm     Reply with quote

So if I buy a student version for the 16F I should still be able to use the 16F and have plenty of memory? Am I correct in thinking that the 99% used was 99% of the allowable 2K and not 99% of the 14K the 16F has?
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Tue Mar 13, 2007 7:26 pm     Reply with quote

16F877A has 8K words of program memory. The demo is limited to 2K
of that. (The first 25%).

According the CCS education version page, the student versions are
limited by the number of PICs they support. They don't say anything
about a program memory limitation.
http://www.ccsinfo.com/content.php?page=education

You could call them to confirm that, but it looks like you would get
full support for the 16F877A with the student version.
totalnoob



Joined: 22 Oct 2006
Posts: 24

View user's profile Send private message

PostPosted: Tue Mar 13, 2007 7:31 pm     Reply with quote

Great, thanks for the help. I'll see about picking up a student version and not worry about switching PICs.
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