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

PIC programming

Discussion in 'Microcontrollers' started by hantto, Feb 11, 2003.

  1. hantto

    hantto Member

    Joined:
    Oct 25, 2002
    Messages:
    380
    Likes:
    1
    Location:
    Finland
    Now when i want to program a pic there is two files with the software. A *.hex file and *. asm, which one is better to use. I'm using IC Prog software.

    Thx, Hantto
     
  2. Pilot

    Pilot New Member

    Joined:
    Jan 5, 2003
    Messages:
    191
    Likes:
    0
    Location:
    England
    The .asm file is the one you write.

    the .hex file is the one you write to the chip

    Have Fun

    :lol:
     
  3. kinjalgp

    kinjalgp Active Member

    Joined:
    Oct 28, 2002
    Messages:
    1,851
    Likes:
    3
    Location:
    INDIA/USA
    In other word
    .ASM (Assembly Source) is the file which you can understand and .HEX is the file which your PIC can understand :)
     
  4. dave

    Dave New Member

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


     
  5. hantto

    hantto Member

    Joined:
    Oct 25, 2002
    Messages:
    380
    Likes:
    1
    Location:
    Finland

    When i open the .asm file the program putputs the hex out of it but when i use the .hex file the output is different. But i should i use the .hex file when programming?
     
  6. kinjalgp

    kinjalgp Active Member

    Joined:
    Oct 28, 2002
    Messages:
    1,851
    Likes:
    3
    Location:
    INDIA/USA
    Yes you have to program only Hex file into the PIC.
    The type of file also depends upon the software you are using for programming. Some softwares require .bin file. But 98% of the programmers I have seen accepts Intel Hex format.
     
  7. Chippie

    Chippie New Member

    Joined:
    Mar 8, 2003
    Messages:
    991
    Likes:
    9
    Location:
    Good 'ole England
    As previously stated, you program the pic with the hex code, this is derived from the asm file created using a text editor.
    The asm file is then assembled using the appropriate assembler, in the case of the pic I would use Mpasm from Microchip. This generates your hex file for you and also if there are any problems it will output an error list too, handy for debugging.


    You will need a programmer that supports the the device you wish to program and the application software for the programmer.

    Checkout my website for a suitable pic programmer and there is probably a link for software for it too.....
     
  8. kinjalgp

    kinjalgp Active Member

    Joined:
    Oct 28, 2002
    Messages:
    1,851
    Likes:
    3
    Location:
    INDIA/USA
    Your website doesn't open up completely.
     

Share This Page