PICbasic pro HEX file size


Closed Thread
Results 1 to 2 of 2
  1. #1
    winsthon's Avatar
    winsthon Guest

    Default PICbasic pro HEX file size

    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?

  2. #2
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    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>:1 00020000330A100E830C1200314092903181B285C<br>:1000 3000000086101D2886141D280130A100933071</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.

Similar Threads

  1. Conversion from picbasic pro to hex for mplab
    By pr2don in forum Forum Requests
    Replies: 5
    Last Post: - 10th October 2010, 19:53
  2. Configuration bits in a HEX file gone missing?
    By grzes.r in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 2nd February 2010, 01:10
  3. INH8XM HEX file structure
    By flotulopex in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 30th December 2006, 22:46
  4. Basic to Hex file Code size ratio
    By barkerben in forum General
    Replies: 0
    Last Post: - 5th January 2006, 15:37
  5. No hex file...?
    By mypylon in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 28th November 2005, 14:02

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts