Connect with us

Upload code from pic

Discussion in 'Microcontrollers, Programming and IoT' started by shlomo1234, Jul 9, 2016.

Scroll to continue with content
  1. shlomo1234


    Jun 20, 2016
    For my hobby Im doing some programing in Picmicro, mostly Pic16F87XA, Pic18FXX2.
    To do so Im using mplab and Pickit3.

    I have an old controll board of airconditioner with mcu Pic16F72.
    My question is,
    Is it Possible To read the code? and how to do so (upload the code to Mplab)?

    Thanks alot
    Last edited: Jul 9, 2016
  2. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    Jan 21, 2010
    The microcontroller may have the security set so that you can't read from it, and even if you can, you'll get hex code, not readable source.
    shlomo1234 likes this.
  3. shlomo1234


    Jun 20, 2016
    So in that case, can I Program other Pic mcu with that hex file? download the file to make a copy one?
  4. BobK


    Jan 5, 2010
    MPLAB will dissassemble the code if you can read it. Still not easy to follow, but at least you get instruction mnemonics instead of just hex code.

    If you can read it, you will be able to program another PIC with the code. But, unless is the exact same part number, it may not work correctly.

    shlomo1234 likes this.
  5. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    Jan 21, 2010
    I guess that with Harvard architecture, this becomes somewhat easier.
  6. hevans1944

    hevans1944 Hop - AC8NS

    Jun 21, 2012
    IF the security bit IS NOT SET, you can download the code from the PIC using your PICkit 3. That's a crap shoot for a commercial product. Why wouldn't the manufacturer lock their code? I would if it were mine.
    shlomo1234 likes this.
  7. Amar Dhore

    Amar Dhore

    Dec 2, 2015
    Yes, you can read it with PICKit 3 if its not protected. Give it a try. Go to the Mplab, create a test project (any random name project). Select a PIC that you want to read from. Instead of compile, click on a read option. It will ask you to save the file as hex. You can use it to program other devices as Bobk mentioned.
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day