View previous topic :: View next topic |
Author |
Message |
totalnoob
Joined: 22 Oct 2006 Posts: 24
|
Need help moving from 16F877A to 18F458 |
Posted: Tue Mar 13, 2007 6:22 pm |
|
|
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
|
|
Posted: Tue Mar 13, 2007 7:01 pm |
|
|
Are you using the CCS demo ? |
|
|
totalnoob
Joined: 22 Oct 2006 Posts: 24
|
|
Posted: Tue Mar 13, 2007 7:07 pm |
|
|
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
|
|
|
totalnoob
Joined: 22 Oct 2006 Posts: 24
|
|
Posted: Tue Mar 13, 2007 7:14 pm |
|
|
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
|
|
Posted: Tue Mar 13, 2007 7:26 pm |
|
|
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
|
|
Posted: Tue Mar 13, 2007 7:31 pm |
|
|
Great, thanks for the help. I'll see about picking up a student version and not worry about switching PICs. |
|
|
|