Debug PIC18F26K20 with Pickit3 - Page 1
Forum section: electronics / general

author: ocset
author_rank: Super Contributor
timestamp: June 21, 2017, 09:58:34 am
content: 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?

author: JPortici
author_rank: Super Contributor
timestamp: June 21, 2017, 10:29:28 am
content: need to see the schematic for the relevant part.IF the debug lines are connected to other components other than the programmer you may have debugging issuesis the board powered by either the PK3 or externally (better)?pickit 3, is genuine? OS? mplab x version?are you trying to debug with only the hex file or are you launching the debug session from the project?

author: NivagSwerdna
author_rank: Super Contributor
timestamp: June 21, 2017, 10:53:03 am
content: Wouldn't it be better to bring thehttps://www.eevblog.com/forum/microcontrollers/esd-damage-to-mclr-pin-of-pic18f26k20/msg1234618/#msg1234618thread to a conclusion before starting another one?

author: CJay
author_rank: Super Contributor
timestamp: June 21, 2017, 11:16:59 am
content: Quote from: NivagSwerdna on June 21, 2017, 10:53:03 amI'm of the opinion that they need to hire an engineer who has the necessary skills to solve this problem, it's admirable that anyone wants to learn but it sounds like this is a problem that will run and run

author: KL27x
author_rank: Super Contributor
timestamp: June 21, 2017, 08:26:38 pm
content: Treez, are you there?There are so many people who are trying to help you. And you either do not follow up their suggestions or you at least do not give any indication that you already excluded those factors.Sounds like you're finally getting closer to trying something reasonable, but there is a good chance you would have figured out the problem a long time ago, if you had actually listened to anyone.Seems like a lot of people would be interested in helping you more, if you actually followed up. When half a dozen people go out of their way to help you, and you discard the thread without a thanks, without a reply, without any followup at all, it is insulting. For instance, you used to have "some boards" that worked, and later it dwindled down to "one board." That does not surprise anyone else, BTW.Did you know to use the debugger, you have to compile a "debug" version of the code which includes extra overhead code? You're welcome. Looking forward to the next new thread in this dungheap example of what you call debugging. I'm sure if you finally fix it you will come back and explain the bumbleheaded problem you found? Not.

author: hexreader
author_rank: Frequent Contributor
timestamp: June 22, 2017, 09:57:45 am
content: Treez already got the answer a while back on one of the other forums where he posted the same question.You can stand down now.... the issue is resolved

author: NivagSwerdna
author_rank: Super Contributor
timestamp: June 22, 2017, 10:20:15 am
content: Hm...Now I see... treez posted the thread in at least three forums...http://www.edaboard.com,http://www.microchip.com/forumsand here.That's pretty sad

author: hexreader
author_rank: Frequent Contributor
timestamp: June 24, 2017, 03:16:29 pm
content: Or maybe the issue is not really resolved - see the linked EDABOARD thread.Debug worked for me, so I guess it is back to looking for cabling issues?

author: NorthGuy
author_rank: Super Contributor
timestamp: June 24, 2017, 03:48:19 pm
content: Without any doubts, PIC18F26K20 has debugging capabilities - 3 hardware breakpoints, whole enchilada.