+ Post New Thread
Results 1 to 15 of 15
  1. #1
    Newbie level 4
    Points: 50, Level: 1

    Join Date
    Mar 2019
    Posts
    7
    Helped
    0 / 0
    Points
    50
    Level
    1

    Unable to program PIC18F4550 through Pickit3

    Hello,
    I use the pickit3 connected to the PIC18F4550 through target board. Each time I run Mplabx v5.15 it shows:
    Device Erased...

    ""
    Programming...

    The following memory area(s) will be programmed:
    program memory: start address = 0x0, end address = 0x97f
    configuration memory
    program memory
    Address: 12 Expected Value: f0 Received Value: e0
    Failed to program device
    ""
    The Expected value and Received value never matches. I don't know if that is the problem and what causes that.

    Note: I wrote my code in Mikroc then now I'm trying to upload the Hex file on the chip through Mplabx IDE

    Does anyone have any idea of what could stop the chip to program?

    Thanks in advance!

    •   AltAdvertisement

        
       

  2. #2
    Super Moderator
    Points: 79,807, Level: 68
    Achievements:
    7 years registered
    Awards:
    2nd Helpful Member
    betwixt's Avatar
    Join Date
    Jul 2009
    Location
    Aberdyfi, West Wales, UK
    Posts
    13,063
    Helped
    4372 / 4372
    Points
    79,807
    Level
    68

    Re: Unable to program PIC18F4550 through Pickit3

    The hex file has nothing to do with it so the compiler you use is irrelevant. It means something is degrading the electrical interface between the Pickit3 and the device itself. Usual culprits are other devices attached to the PGC/PGD/PGM pins or the supply is being dragged down by other parts of the target circuit.

    Can you post exactly how it connects to the PIC, including other components connected to those pins and sharing the same VSS and VDD lines please.

    Brian.
    PLEASE - no friends requests or private emails, I simply don't have time to reply to them all.
    It's better to share your questions and answers on Edaboard so we can all benefit from each others experiences.



  3. #3
    Advanced Member level 3
    Points: 7,096, Level: 20
    Achievements:
    7 years registered

    Join Date
    Jul 2010
    Location
    Sweden
    Posts
    934
    Helped
    365 / 365
    Points
    7,096
    Level
    20

    Re: Unable to program PIC18F4550 through Pickit3

    Check the hex file manually, so it doesn't contain more than one row that specify a value for address 12.



  4. #4
    Advanced Member level 2
    Points: 2,848, Level: 12
    baileychic's Avatar
    Join Date
    Aug 2017
    Posts
    562
    Helped
    49 / 49
    Points
    2,848
    Level
    12

    Re: Unable to program PIC18F4550 through Pickit3

    Maybe you have PIC18F4550 on hardware and have selected say PIC18LF4550 in MPLAB X or PIC18LF4550 was selected in mikroC PRO PIC?



  5. #5
    Newbie level 4
    Points: 50, Level: 1

    Join Date
    Mar 2019
    Posts
    7
    Helped
    0 / 0
    Points
    50
    Level
    1

    Re: Unable to program PIC18F4550 through Pickit3

    Quote Originally Posted by betwixt View Post
    The hex file has nothing to do with it so the compiler you use is irrelevant. It means something is degrading the electrical interface between the Pickit3 and the device itself. Usual culprits are other devices attached to the PGC/PGD/PGM pins or the supply is being dragged down by other parts of the target circuit.

    Can you post exactly how it connects to the PIC, including other components connected to those pins and sharing the same VSS and VDD lines please.

    Brian.
    Sorry for the late response, I am making a direct connection with the pickit3 and its target board.
    Click image for larger version. 

Name:	IMG_1560.jpg 
Views:	7 
Size:	504.9 KB 
ID:	152442

    Thank you for the reply!
    Last edited by spiritevil; 18th April 2019 at 12:43.



    •   AltAdvertisement

        
       

  6. #6
    Newbie level 4
    Points: 50, Level: 1

    Join Date
    Mar 2019
    Posts
    7
    Helped
    0 / 0
    Points
    50
    Level
    1

    Re: Unable to program PIC18F4550 through Pickit3

    Quote Originally Posted by std_match View Post
    Check the hex file manually, so it doesn't contain more than one row that specify a value for address 12.
    Hello,
    I am new to pic programming and I'm not sure to know what you mean. I have opened the hex file as a note but I don't know what to check exactely.
    Thank you!



    •   AltAdvertisement

        
       

  7. #7
    Advanced Member level 2
    Points: 2,848, Level: 12
    baileychic's Avatar
    Join Date
    Aug 2017
    Posts
    562
    Helped
    49 / 49
    Points
    2,848
    Level
    12

    Re: Unable to program PIC18F4550 through Pickit3

    I have a spare PIC18F4550, PICKit3, MPLABX IDE 5.15, and mikroC PRO PIC. I have a similar PIC programming adapter. Zip and post your complete mikroC project files and I will see if the same error gets reproduced here.



  8. #8
    Newbie level 4
    Points: 50, Level: 1

    Join Date
    Mar 2019
    Posts
    7
    Helped
    0 / 0
    Points
    50
    Level
    1

    Re: Unable to program PIC18F4550 through Pickit3

    Quote Originally Posted by baileychic View Post
    I have a spare PIC18F4550, PICKit3, MPLABX IDE 5.15, and mikroC PRO PIC. I have a similar PIC programming adapter. Zip and post your complete mikroC project files and I will see if the same error gets reproduced here.
    MyProject1.txt

    Here is the Mikro C code



  9. #9
    Advanced Member level 2
    Points: 2,848, Level: 12
    baileychic's Avatar
    Join Date
    Aug 2017
    Posts
    562
    Helped
    49 / 49
    Points
    2,848
    Level
    12

    Re: Unable to program PIC18F4550 through Pickit3

    I don't know what project settings (fuses, Osc, etc,..) you have set in mikroC and I don't have the patience to create a new mikroC project and compile the code by guessing the project settings.

    If you zip and post the complete mikroC project files then I might be able to help you. You can use shareware version of winrar 5.7 to zip the files.

    www.rarlab.com

    The PICKit3 in the image looks like a genuine one.
    Last edited by baileychic; 18th April 2019 at 14:57.



  10. #10
    Super Moderator
    Points: 79,807, Level: 68
    Achievements:
    7 years registered
    Awards:
    2nd Helpful Member
    betwixt's Avatar
    Join Date
    Jul 2009
    Location
    Aberdyfi, West Wales, UK
    Posts
    13,063
    Helped
    4372 / 4372
    Points
    79,807
    Level
    68

    Re: Unable to program PIC18F4550 through Pickit3

    The compiler should never produce duplicate addresses in its hex file. It would imply the linker had failed and at the very least should abort with an error.

    Most likely the cause is a clone Pickit3 instead of a real one or there are other components on the board attached to the programming signals. Note that although the VDD pin will produce some supply power, it is really there to monitor the voltage from an external supply. If your device is a clone, it may not have enough output capability to power the PIC during the programming process.

    The other thing to check is whether LVP is enabled. If one of the links on the board is connected to the LVP pin it could stop it entering the correct programming mode.

    Brian.
    PLEASE - no friends requests or private emails, I simply don't have time to reply to them all.
    It's better to share your questions and answers on Edaboard so we can all benefit from each others experiences.



  11. #11
    Newbie level 4
    Points: 50, Level: 1

    Join Date
    Mar 2019
    Posts
    7
    Helped
    0 / 0
    Points
    50
    Level
    1

    Re: Unable to program PIC18F4550 through Pickit3

    Quote Originally Posted by baileychic View Post
    I don't know what project settings (fuses, Osc, etc,..) you have set in mikroC and I don't have the patience to create a new mikroC project and compile the code by guessing the project settings.

    If you zip and post the complete mikroC project files then I might be able to help you. You can use shareware version of winrar 5.7 to zip the files.

    www.rarlab.com

    The PICKit3 in the image looks like a genuine one.
    the mikroc file
    Mikro c.rar

    - - - Updated - - -

    Quote Originally Posted by betwixt View Post
    The compiler should never produce duplicate addresses in its hex file. It would imply the linker had failed and at the very least should abort with an error.

    Most likely the cause is a clone Pickit3 instead of a real one or there are other components on the board attached to the programming signals. Note that although the VDD pin will produce some supply power, it is really there to monitor the voltage from an external supply. If your device is a clone, it may not have enough output capability to power the PIC during the programming process.

    The other thing to check is whether LVP is enabled. If one of the links on the board is connected to the LVP pin it could stop it entering the correct programming mode.

    Brian.
    Sorry as I said I'm new to this, so I would like to know how to check the LVP whether it's enabled or not...
    Thanks!



  12. #12
    Advanced Member level 4
    Points: 8,070, Level: 21
    Achievements:
    7 years registered
    paulfjujo's Avatar
    Join Date
    Jun 2008
    Location
    France 01120
    Posts
    1,307
    Helped
    264 / 264
    Points
    8,070
    Level
    21

    Re: Unable to program PIC18F4550 through Pickit3

    hello,

    it is not so clear on the photo
    is j1 jumper on slot A of ZIF support..



    •   AltAdvertisement

        
       

  13. #13
    Advanced Member level 2
    Points: 2,848, Level: 12
    baileychic's Avatar
    Join Date
    Aug 2017
    Posts
    562
    Helped
    49 / 49
    Points
    2,848
    Level
    12

    Re: Unable to program PIC18F4550 through Pickit3

    I checked the LVP settings in Project>Edit Project dialog box and it is disabled. So, it is not a problem with LVP.


    1 members found this post helpful.

  14. #14
    Newbie level 4
    Points: 50, Level: 1

    Join Date
    Mar 2019
    Posts
    7
    Helped
    0 / 0
    Points
    50
    Level
    1

    Re: Unable to program PIC18F4550 through Pickit3

    J1 is on A
    J2 is on 2-3
    J3 is on 2-3



  15. #15
    Member level 4
    Points: 1,629, Level: 9

    Join Date
    May 2012
    Location
    Mumbai, India
    Posts
    73
    Helped
    1 / 1
    Points
    1,629
    Level
    9

    Re: Unable to program PIC18F4550 through Pickit3

    One of the possible reason can be your USB port is not able to pump enough power to pickit3 try changing the USB port or using USB hub/ extender.



--[[ ]]--