• 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.

Debug PIC18F26K20 with Pickit3

Status
Not open for further replies.

Flyback

Well-Known Member
Hello,
Our software works on some of our PCBs but not others.
We program them with pickit3 and use ICSP.
Can we just plug the Pickit3 into the board and debug it like that?

When i try to debug I am getting "Connection failed" error in MPLAB X IDE. Do you know why?
I have the 5 pin header in the pickit3 and its connected to the PCB.

I actually programmed the board with this connector/wire assembly so i know the 5 lines are connected (MCLR,Vdd,Vss, PgD,PgC).

In order to do debugging, do i have to program the PIC18F26K20 with the ".hlx" file instead of the normal ".hex" file?
 

be80be

Well-Known Member
You got set debug in the config word too and make sure lvp is turned off mplab x like to set that to on.
 

Pommie

Well-Known Member
Most Helpful Member
The debug bit in config is automatically set/cleared by the IDE depending on the build configuration. If you can program but not debug then something is wrong in hardware. Capacitor on Mclr? Some circuitry on PGD/PGC?

Mike.
 

be80be

Well-Known Member
Well sounds good but maybe mplab X is acting like mine cause I've set it to use the pickit 3 and used the ccm to set pins and it's done funny things to the configure settings.
I had to go back and change the configure on the chip the op is using and a pic 32 when i used the ccm
I had about the same problem with this chip some times it would act like it wasn't working it had set to lvp and mclr turned off but that was using the ccm to set pins. witch don't work right some times I started reading the files ccm makes and change its mistakes or mine and it works fine after that.
 
Last edited:

granddad

Well-Known Member
Perhaps ICSP Wires too long ? Also put a ferrite core / block on the USB cable , make sure PK3 pin 6 not connected.
 

phalanx

Member
Hi Flyback,

I noticed you posted this exact question on the Sparkfun forums as the user "treez". You really need to follow up on your threads and provide the details people are asking for if you expect to get things squared away in a timely manner.

-Bill
 
Status
Not open for further replies.

Latest threads

EE World Online Articles

Loading
Top