PDA

View Full Version : Program Size.....



robertmark68
- 28th September 2006, 21:31
I'm targetting a 16F877A device....

Today I got this message when compiling....

"...code crosses boundary @ 800h"

This got to me to thinking about something I hadn't since I have started playing with PIC's...PROGRAM SIZE and its logical question:

"How big can I make a program in the device i have chosen?"

I would say I have written about half the code I need and i want to know if I am going to have enough space to finish the code.

The compiler says I have used 2070 words. which naturally begs the question...how many words are there?

I'm sorry if this questions seems terribly 'newbie'...but that is after all what I am.

Thanks in advance!

Robert

keithdoxey
- 28th September 2006, 22:12
Hi Robert,

The datasheet will tell you the size of the program memory for your chosen PIC.

Its difficult to guess how much space you will actually need as it depends on which commands you are using.

The first time a command is used in a program a whole load of Macros are added to the program to deal with that command so just adding one line can result in quite an alarming increase in size. Having said that, once the macros are included you can then add quite a lot of code and the finished file doesnt seem to grow at the same rate.

I guess Darrel, Melanie or one of the other experts may be able to give a more complete answer but those are my observations as my main project progresses.

Darrel Taylor
- 28th September 2006, 22:28
Nope, I think you covered it.

Except for this maybe ...

http://www.picbasic.co.uk/forum/showthread.php?t=555
<br>