PDA

View Full Version : PICbasic pro HEX file size



winsthon
- 10th January 2004, 04:48
Hi, I just want to ask in PIC Basic Pro, I have 500 words of code and when I compiled it the hex file is 8kb is this normal for pic basic pro? I mean thats too big and my PIC16F877 only has 8kb memory. Im in the middle part of my program, I still have to add something to it. anybody?

Darrel Taylor
- 10th January 2004, 09:11
The difference is in the way the Hex file is formatted.

If you open a HEX file in Notepad, you'll see that it's stored in ascii text. It looks something like this:<pre><br>:10000000B2010E290408A20083168610831209305B<br>:10001000A30003101620A20CA30B0A280314162019<br>:100020000330A100E830C1200314092903181B285C<br>:10003000000086101D2886141D280130A100933071</pre>Each line starts with a colon and an address. Then each word takes 4 bytes. Add the config bytes and probably some other stuff I can't identify, and the file will get much larger than the number of actual words used.

As long as the reported number of words is less than the size of the chips memory, you should be OK.