1. Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
    Dismiss Notice

Hex To Asm Converter

Discussion in 'Microcontrollers' started by muras, Jul 13, 2006.

  1. muras

    muras New Member

    Joined:
    Jul 12, 2006
    Messages:
    6
    Likes:
    0
    Hi everyone!
    I have an HEX code of a program but I can´t read it with the program I use (Mplab from microchip).
    My question is:Is there anyway to transform this code to ASM or anyway to read it?
    Thanks ;)
     
    Last edited: Jul 13, 2006
  2. Hero999

    Hero999 Banned

    Joined:
    Apr 6, 2006
    Messages:
    14,902
    Likes:
    79
    Location:
    England
    You need a disassembler, the question is whether they make them for the chip you're talking about, unfortunately I have no idea.
     
  3. muras

    muras New Member

    Joined:
    Jul 12, 2006
    Messages:
    6
    Likes:
    0
    The chip is PIC16F877
     
  4. dave

    Dave New Member

    Joined:
    Jan 12, 1997
    Messages:
    -
    Likes:
    0


     
  5. Pommie

    Pommie Well-Known Member Most Helpful Member

    Joined:
    Mar 18, 2005
    Messages:
    10,161
    Likes:
    340
    Location:
    Brisbane Australia
    ONLINE

    You can download PicDis from http://www.picemulator.com/.

    Mike.
     
  6. Nigel Goodwin

    Nigel Goodwin Super Moderator Most Helpful Member

    Joined:
    Nov 17, 2003
    Messages:
    39,331
    Likes:
    653
    Location:
    Derbyshire, UK
    My programmer software includes a disassembler, and the 16F877 is one of the supported devices.
     
  7. muras

    muras New Member

    Joined:
    Jul 12, 2006
    Messages:
    6
    Likes:
    0
    Thank you all!;)
     
  8. rtamas

    rtamas New Member

    Joined:
    Jul 11, 2006
    Messages:
    2
    Likes:
    0
    Last edited: Jul 15, 2006
  9. tnen

    tnen New Member

    Joined:
    Jul 15, 2006
    Messages:
    1
    Likes:
    0
    icproj1.05 hex to asm ok.?
     
  10. rifu_xiansheng83

    rifu_xiansheng83 New Member

    Joined:
    Oct 5, 2007
    Messages:
    1
    Likes:
    0
    How about if we are using Atmel series?
     
  11. Lesh

    Lesh New Member

    Joined:
    Oct 23, 2007
    Messages:
    17
    Likes:
    0
    Use File Import to load the file in MPLAB, then go to the View Program Memory window (symbolic), then right click and choose output to file.
     
  12. Nigel Goodwin

    Nigel Goodwin Super Moderator Most Helpful Member

    Joined:
    Nov 17, 2003
    Messages:
    39,331
    Likes:
    653
    Location:
    Derbyshire, UK
    And how would that help for an Atmel HEX file?.
     
  13. Lesh

    Lesh New Member

    Joined:
    Oct 23, 2007
    Messages:
    17
    Likes:
    0
    If you were a real programmer you wouldn't be bothered with little details like different instructions sets and such ;)

    My bad for not noticing this was for an Atmel, I thought I read PIC somewhere.

    edited to add,
    the OP did say "The chip is PIC16F877"
     
    Last edited: Oct 24, 2007
  14. Nigel Goodwin

    Nigel Goodwin Super Moderator Most Helpful Member

    Joined:
    Nov 17, 2003
    Messages:
    39,331
    Likes:
    653
    Location:
    Derbyshire, UK
    But the post above your's, presumably the one you replied to?, says:

     
  15. Lesh

    Lesh New Member

    Joined:
    Oct 23, 2007
    Messages:
    17
    Likes:
    0
    I do see that the OP was from 2006, I missed that one.
     
  16. jeremygaughan

    jeremygaughan New Member

    Joined:
    Sep 26, 2007
    Messages:
    129
    Likes:
    1
    Location:
    Hot Springs, AR
    Along these same lines... I have a hex file for a 10f200/OT and I´d like to have it in 12f629. Is it possible to convert the file (paying attention to the pin assignment) by just changing the heading of the file after decompiling it? Also I have a hex for a 12c509 and again I want it in 12f629. I read they are very similar. So, I propose the same question. decompile change the pic name mind the pins and recompile?
     
  17. Nigel Goodwin

    Nigel Goodwin Super Moderator Most Helpful Member

    Joined:
    Nov 17, 2003
    Messages:
    39,331
    Likes:
    653
    Location:
    Derbyshire, UK
    12C series are 12 bit PIC's, the 12F629 (despite it's number) is a 14 bit device. I'm not sure what the 10F series are?.

    So it's probably not as simple as just changing the header, there are probably a few other fairly minor changes required. But in either case, it's probably no big deal?.
     
  18. mike50

    mike50 New Member

    Joined:
    Jun 29, 2007
    Messages:
    103
    Likes:
    2
    Location:
    Rochester, Minnesota
    The 10F devices are 12-bit

    Mike
     
  19. Nigel Goodwin

    Nigel Goodwin Super Moderator Most Helpful Member

    Joined:
    Nov 17, 2003
    Messages:
    39,331
    Likes:
    653
    Location:
    Derbyshire, UK
    Thanks Mike, I presumed they would be - certainly wouldn't be 10 bit :p that would be a RISC chip!.
     
  20. thotrang

    thotrang New Member

    Joined:
    Aug 9, 2006
    Messages:
    1
    Likes:
    0
    You can use Mbug program to convert hex file to .asm file easily.
    I used this program ten years ago.
    Cheer
     
  21. PaulF

    PaulF New Member

    Joined:
    Oct 27, 2007
    Messages:
    7
    Likes:
    0

Share This Page