Hot!Getting a really annoying error message when programming/debugging

Author
kristofer
New Member
  • Total Posts : 9
  • Reward points : 0
  • Joined: 2017/07/19 07:16:57
  • Location: 0
  • Status: offline
2017/08/11 13:32:56 (permalink)
0

Getting a really annoying error message when programming/debugging

Using MPlab X 3.65/4.00, PIC18F26K20 microcontroller attached to the HPC curiosity dev board. When I try to program, I get this message:
Target Device ID (0x0) is an Invalid Device ID. Please check your connections to the Target Device.

This came up in both versions of MPlab. I've gotten this error before and fixed it by starting the debugger and quickly stopping it before the error came up. I think it's caused by the debugger freezing and not stopping properly, but I'm just shooting in the dark. I've programmed this board before, and the only thing I changed when this error came up was the program. Now I CANNOT get it to go away, and it has halted all development. If anyone knows what to do please tell me.
#1

5 Replies Related Threads

    Aussie Susan
    Super Member
    • Total Posts : 2893
    • Reward points : 0
    • Joined: 2008/08/18 22:20:40
    • Location: Melbourne, Australia
    • Status: offline
    Re: Getting a really annoying error message when programming/debugging 2017/08/11 22:15:27 (permalink)
    +1 (1)
    Basically it means that the debugger you are using cannot talk correctly to the MCU. When the debugger tries to get the MCUs ID, all it gets back is 0x00.
    Have you made sure that the programmer/debugger you are using (do don't say which - I don't know the Curiosity board: does it have a built in programmer/debugger) is correctly connected to the MCU and there are no other connections to the PGC, PGD and PGM pins that could be interfering?
    Susan
    #2
    jtemples
    Super Member
    • Total Posts : 10192
    • Reward points : 0
    • Joined: 2004/02/13 12:31:19
    • Location: Southern California
    • Status: offline
    Re: Getting a really annoying error message when programming/debugging 2017/08/11 23:47:22 (permalink)
    +2 (2)
    All the Curiosity boards have a PKOB, though they can be used with external programmers.  The PKOB requires the use of LVP, and of course it requires the PIC be plugged in correctly (the board does not come with a PIC18F26K20).
    #3
    HowardH
    Super Member
    • Total Posts : 779
    • Reward points : 0
    • Joined: 2006/01/20 10:21:24
    • Location: Microchip Technology - Chandler, AZ
    • Status: offline
    Re: Getting a really annoying error message when programming/debugging 2017/08/12 15:16:58 (permalink)
    +1 (1)
    Hi Kristofer,

    jtemples is correct. The circuit on the board requires LVP on the device to be enabled. Do you have another tool to verify this?

    Thanks,

    Howard
    #4
    kristofer
    New Member
    • Total Posts : 9
    • Reward points : 0
    • Joined: 2017/07/19 07:16:57
    • Location: 0
    • Status: offline
    Re: Getting a really annoying error message when programming/debugging 2017/08/14 05:31:43 (permalink)
    0
    Thanks for the replies. I'm using the PICkit 3. For some reason I didn't feel it was necessary to connect the PGM pin to the board with my custom header. I fixed it and haven't had any issues yet. It seems it is possible to program without it though.
    #5
    qhb
    Superb Member
    • Total Posts : 5805
    • Reward points : 0
    • Joined: 2016/06/05 14:55:32
    • Location: One step ahead...
    • Status: offline
    Re: Getting a really annoying error message when programming/debugging 2017/08/14 05:49:44 (permalink)
    +2 (2)
    The PGM pin should be pulled low to ensure reliable programming.
    Connecting it to the PK3 will do this for you, but a 10k resistor will do it just as well.
     
    #6
    Jump to:
    © 2017 APG vNext Commercial Version 4.5