Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[PIC] Unable to program PIC18F4550 through Pickit3

Status
Not open for further replies.

spiritevil

Newbie level 4
Newbie level 4
Joined
Mar 18, 2019
Messages
7
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
46
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!
 

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.
 

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

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

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.
IMG_1560.jpg

Thank you for the reply!
 
Last edited:

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!
 

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.
 

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:

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.
 

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
View attachment Mikro c.rar

- - - Updated - - -

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!
 

hello,

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

I checked the LVP settings in Project>Edit Project dialog box and it is disabled. So, it is not a problem with LVP.
 
J1 is on A
J2 is on 2-3
J3 is on 2-3
 

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.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top