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.

Debug PIC18F26K20 with Pickit3

Status
Not open for further replies.
T

treez

Guest
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?
 

PIC1xxxKxx doesn't support debugging. You need to order the mcu with same name, but with debug enabled. They a bit more expensive and made for developing stage only. This is stupid microchip approach and the one of the reason forced me to use STM.
 
  • Like
Reactions: treez

    T

    Points: 2
    Helpful Answer Positive Rating
The internal debugging hardware isn't present in all PICs, it does impose some limitations on their final user so only selected or special order devices has it enabled. For debugging situations like yours they recommend a plug in simulator (ICD) which replaces the processor until you are happy your software is ready for production.
The software simulator does work remarkably well though and should be able to identify your problems.

Working on some boards but not others does sound pretty serious though, are the PCBs identical or is it working on some variant but not others. I've never come across a situation where there is random operability except for where there has been an electrical problem. For example, I've seen boards where some worked bit not others which was traced to 220pF instead of 22pF crystal loading capacitors, a manufacturing mistake bit not obvious with SMD devices. The larger value let some 'only just' work or start working when test probes were applied.

Brian.
 
  • Like
Reactions: treez

    T

    Points: 2
    Helpful Answer Positive Rating
Working on some boards but not others does sound pretty serious though, are the PCBs identical or is it working on some variant but not others.
Thansk, all PCBs are identical.
 

PIC1xxxKxx doesn't support debugging. You need to order the mcu with same name, but with debug enabled. They a bit more expensive and made for developing stage only. This is stupid microchip approach and the one of the reason forced me to use STM.
I checked the datasheet of PIC18F26K20 and found no mention of the need for a special debug version of the chip.

I tried DEBUG with PK3 on PIC18F26K20 and it seemed to work.

Could you be mistaken?
 
  • Like
Reactions: treez

    T

    Points: 2
    Helpful Answer Positive Rating
Sure, can. I didn't used microchip mcu last 5 years. May be something was changed. I used PIC18F13K50 and PIC18F14K50. They didn't supported debug.
 
  • Like
Reactions: treez

    T

    Points: 2
    Helpful Answer Positive Rating
Easyrider - both of the devices you mention require a separate debug header whereas the one mentioned by the OP does not and can be debugged directly.
Susan
 
  • Like
Reactions: treez

    T

    Points: 2
    Helpful Answer Positive Rating
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top