ICSP problem with PIC18F46K22

Discussion in 'Embedded Systems and Microcontrollers' started by jean120, May 7, 2016.

  1. jean120

    Thread Starter Member

    Jan 24, 2016
    75
    1
    Hello,I would like to program a pic18f46k22 when being on my breadboard but I am not finding a PGM pin of the PIC,could anyone please help?

    I used extension wires so I linked my ICD3 with the breadboard where the PIC is but in MPLAB I get the following messages:

    Target Detected and then
    ICD3Err0086: Target Device ID (00000000) does not match
    expected Device ID (00005400). If you experience persistent
    problems communicating, the ICD 3 test interface can be
    used to help diagnose the problem.

    could you please help me?I found only the useful pin PGD,PGC and MCLR and the supply pins (VDD,VSS) but the PGM pin I don`t find it on this PIC how may I set it correctly?

    all the best!!
     
  2. jpanhalt

    AAC Fanatic!

    Jan 18, 2008
    5,689
    901
    1) Have you used the Microchip interface test device that comes with the ICD3? Did the interface test OK?
    2) How long are your connecting wires. Are you using supplied cables or lose wires?
    3) Why do you think there is a "PGM" pin? Only the 5 connections you mention are needed.

    John
     
  3. dannyf

    Well-Known Member

    Sep 13, 2015
    1,791
    360
    there are a lot of nice people out there willing to help but you have made it quite challenging for others to help you.

    you probably want to learn to help others help you.
     
  4. jean120

    Thread Starter Member

    Jan 24, 2016
    75
    1
    Hello,
    1.I didnot use it,but I replaced a PIC with another one of the same type but no success
    2.The wires are very small 10cm approx
    3.I thought there is a PGM pin like on the PIC16F877A for example
    Referring to the PIC18F46K22 datasheet its possible there is no PGM pin because the ICSP is done using two connections PGD and PGC of the PIC18F46K22

    I removed the PIC18F46K22 and replaced with PIC16F1937 but this last one was well connected (the communication has established effectively),

    Please help
     
    Last edited: May 7, 2016
  5. jean120

    Thread Starter Member

    Jan 24, 2016
    75
    1
    Dear dannyf ,what is the problem with my post?I tried to explain clearly what is going on!!
     
  6. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    7,387
    1,605
    A Target Device ID of 00000000 simply means no data was returned to the ICD from the PIC.

    Just five lines. Check and recheck the connections. I have a habit of swapping data and clock. The PIC16F1937 is a good choice to check as it uses all the same pins.

    Is the PIC powered? Either the ICD or the circuit needs supply power during programming.
     
    Last edited: May 7, 2016
  7. jpanhalt

    AAC Fanatic!

    Jan 18, 2008
    5,689
    901
    I am not familiar with the 18F chips, but from what I have read on various forums, LVP configuration and/or failure to have a pull-up on MCLR (RE3) is a frequent problem. There are many discussion on the matter. Here is a link to one on the Microchip forum: http://www.microchip.com/forums/m640643.aspx
    The fact that a 16F1xxx chip programs fine suggests to me that may be the source of your problem.

    Presumably, you are using or intending to use HVP with the ICD3. Correct?

    John
     
  8. jean120

    Thread Starter Member

    Jan 24, 2016
    75
    1
    Hello,this has solved yesterday it was a problem of bad connection so I preferred to make some soldering so I sorted it.

    Best Regards,
     
    ErnieM likes this.
Loading...