hex files don't agree


Closed Thread
Results 1 to 4 of 4
  1. #1
    Join Date
    Jun 2011
    Location
    Indian Harbour Nova Scotia
    Posts
    108

    Default hex files don't agree

    I compiled a PicBasic Pro program using MicroCode Studio that compiled without error and the program works. When I look at the hex file created through the MELabs programmer under the tab "memory", the codes DO NOT match up with the hex file I open with Notepad.

    Here's the first few lines of memory (whatever that is) in attachment memory.jpgName:  Memory.jpg
Views: 299
Size:  14.5 KB
    and the first few lines of the *.hex file called hex.jpgName:  hex.jpg
Views: 329
Size:  36.5 KB

    How come?

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


    Did you find this post helpful? Yes | No

    Default Re: hex files don't agree

    They look identical to me.

    Maybe, knowing how the "Intel hex Format" works will help you see the same thing.
    http://en.wikipedia.org/wiki/Intel_HEX
    DT

  3. #3
    Join Date
    Jun 2011
    Location
    Indian Harbour Nova Scotia
    Posts
    108


    Did you find this post helpful? Yes | No

    Default Re: hex files don't agree

    Since one of the files was in Notepad, I did a search for any pattern that looked like a command and came up empty. But you're right, it's my interpretation that is leading to the confusion, as I suspected. I'm quite familiar with Motorola S-records but not Intel.

    In the Wiki you provided there is this statement: "Beware! While addresses are always given as big endian byte addresses, it's unspecified how to interpret the data bytes. Whether they are taken as bytes, 16- or 32 bit little- or big endian words is application specific."

    So what is PBP? big or small endian? bytes? words?

    -Can you break down and maybe highlight one or two commands that are "the same" so I can get my head around this? (I don't need to know this for any particular reason except that I MUST know it).

    -What is the "memory" referred to in the MeLabs programmer popup? Is it program memory IN THE CHIP or is it some kind of buffer memory stored in PBP session, or is it a hex file located on the windows disk?

  4. #4
    Join Date
    Jun 2011
    Location
    Indian Harbour Nova Scotia
    Posts
    108


    Did you find this post helpful? Yes | No

    Default Re: hex files don't agree

    Ahh...I see it now. 28A2 in the first hex display (from PBP programmer) is shown as A228 in the second hex display (on hard drive).

    The bytes are swapped.

    Long time ago I decided to stick with Motorola assembler and machine code because their's was more intuitive than the backwards logic of Intel. (8080, 8086 stuff).

Similar Threads

  1. EasyPic5, PicFlash2 and hex files
    By david1800 in forum Off Topic
    Replies: 2
    Last Post: - 11th July 2011, 07:11
  2. Creating your own .inc files
    By mjphillips1981 in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 27th May 2009, 12:46
  3. Compiler not creating .hex files for programmer.
    By Teknikum in forum mel PIC BASIC Pro
    Replies: 11
    Last Post: - 15th May 2009, 10:37
  4. How to use MPASM 'INC' files?
    By circuitpro in forum General
    Replies: 9
    Last Post: - 30th January 2009, 05:22
  5. Using PBP Hex Files with FED Pic Programmer
    By jrudd in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 20th February 2005, 10:57

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