PDA

View Full Version : More space than I thought !!!



keithdoxey
- 10th August 2006, 02:19
Well, I knew that I was running out of space in my 16F877 and today I hit the end of the chip.

No problem thinks me, just move to a bigger PIC.

I recompiled for a different PIC and the program appeared to grow by about 50% compared to what I was seeing before.

Commenting out part of the program so it still fits the 16F877 and compiling for various processors I get

16F877 = 8079 words
18F452 = 12284 bytes
18F4520 = 12296 bytes

Now that I have it written in front of me I can now see that for the 18F series Microcode Studio is reporting the size in BYTES whereas for the 16F series it is reporting WORDS.

So it seems that instead of growing by 50%, the size of the code is actually SHRINKING by about 25%

Looked at the size of the HEX files poduced and for the 16F it is about 46K whereas the two 18F processors it is about 34K.

Is the apparent shrinkage of the code down to the fact that 18F processors are more powerful and can therefore do more in hardware rather than software eg Hardware Multiplier ?

Its definately a welcome bonus. Whereas I thought I was getting twice as much codespace, because of the decrease in code size I am effectively getting even more space to play with :)

Time to digout the PICStart programmer and get the bootloader into a few chips so I can continue work :)

sayzer
- 10th August 2006, 08:08
Check this:

http://www.picbasic.co.uk/forum/showthread.php?t=3548

BigWumpus
- 10th August 2006, 19:21
Do you use a lot of tables in codespace ?

BigWumpus
- 10th August 2006, 20:04
Do you use a lot of tables in codespace ?