---
+ Post New Thread
Results 1 to 8 of 8
  1. #1
    Full Member level 4
    Points: 2,896, Level: 12

    Join Date
    May 2006
    Location
    Cairo - Egypt
    Posts
    234
    Helped
    27 / 27
    Points
    2,896
    Level
    12

    ICD-2 error: Invalid target device id (expected=0xD4, read=0x0)

    hello all

    i am using a pic 18f4580 with the icd2, and i am putting it in a circuit powered by 5 v regulated supply and the MCU and 16 MHZ crystal and led.

    when i connect the icd2 to the mplab (in either programmer or debugger mode , i get the following error :ICDWarn0020: Invalid target device id (expected=0xD4, read=0x0), i always get validation error, such that every expected variables is read as zeros, which prohibit debugging and programmin).

    i tried to program the MCU with a program to turn on the led (using another programmer). and then place the MCU in the debugging crcuit again so the led is on and after connecting the icd2 it is off (mclr is down) then in mplab when i choose the programmer settings to release from reset mode, the led lights again (all i want to tll is that all tests of the connection from the icd2 to MCU is good), so what is the problem , why he reads anything as zero.

    Thanks in advance

    •   Alt6th April 2007, 21:56

      advertising

        
       

  2. #2
    are
    are is offline
    Full Member level 1
    Points: 2,936, Level: 12

    Join Date
    Nov 2004
    Location
    Balen (Belgie)
    Posts
    111
    Helped
    14 / 14
    Points
    2,936
    Level
    12

    ICD-2 Problem

    I have a similar problem with my ICD2, after changing the serial resistors 330 ohm to 100 ohm the problem was gone.



  3. #3
    Advanced Member level 2
    Points: 4,839, Level: 16
    UroBoros's Avatar
    Join Date
    May 2004
    Location
    Cochin - India
    Posts
    611
    Helped
    19 / 19
    Points
    4,839
    Level
    16

    Re: ICD-2 Problem

    Hi

    Please check


    see the results on self check,is all test passed?

    see the connections on PGC and PGD ,any pull ups or any loads on that line?


    is there any large decoupling capacitors on MCLR?


    stay in programmer mode until you get valid id , then to debugg mode.

    If not ok in debugg, check crystal.

    make sure PGC and PGD pins are not reversed (:D )

    all the best

    picstudent



    •   Alt7th April 2007, 15:56

      advertising

        
       

  4. #4
    Advanced Member level 5
    Points: 14,575, Level: 29
    blueroomelectronics's Avatar
    Join Date
    Sep 2006
    Location
    Toronto, Canada
    Posts
    1,682
    Helped
    179 / 179
    Points
    14,575
    Level
    29

    Re: ICD-2 Problem

    Quote Originally Posted by Picstudent
    is there any large decoupling capacitors on MCLR?
    There should be no caps of any sort on MCLR when using ICP

    I had students with 10uf on MCLR and of course it failed any attempt at programming / debugging whatever. No caps period, you don't need them on MCLR. You DO need caps 0.1 near the power & gnd pins on the PIC and any other digital IC.



  5. #5
    Full Member level 4
    Points: 2,896, Level: 12

    Join Date
    May 2006
    Location
    Cairo - Egypt
    Posts
    234
    Helped
    27 / 27
    Points
    2,896
    Level
    12

    Re: ICD-2 Problem

    Quote Originally Posted by Picstudent
    Hi

    Please check


    see the results on self check,is all test passed?

    see the connections on PGC and PGD ,any pull ups or any loads on that line?


    is there any large decoupling capacitors on MCLR?


    stay in programmer mode until you get valid id , then to debugg mode.

    If not ok in debugg, check crystal.

    make sure PGC and PGD pins are not reversed (:D )

    all the best

    picstudent
    Thanks al ot for your reply,
    As an answer to your questions:
    1- yes, it passes all self test
    2-PGC,PGD connections are all identical to that in the manual
    3-no caps at MCLR at all

    Hpwever when i tried to power the circuit from the ICD-2, it goes well, but when i my circuit is self powered, the same problem occurs

    Does anybody know why?



  6. #6
    Full Member level 1
    Points: 2,743, Level: 12

    Join Date
    Apr 2006
    Location
    Under Mango Tree
    Posts
    95
    Helped
    9 / 9
    Points
    2,743
    Level
    12

    Re: ICD-2 Problem

    Quote Originally Posted by blueroomelectronics
    I had students with 10uf on MCLR and of course it failed any attempt at programming / debugging whatever. No caps period, you don't need them on MCLR. You DO need caps 0.1 near the power & gnd pins on the PIC and any other digital IC.
    No need of capacitors on MCLR while debugging or programming, agreed.
    But, On working prototype I had somany bad experiences by removing the capacitor from MCLR.
    for example, if you are driving an inductive load like contactor, it will produce unwatned noise and cause the PIC reset itself.



  7. #7
    Newbie level 3
    Points: 1,083, Level: 7

    Join Date
    Apr 2007
    Location
    China
    Posts
    2
    Helped
    0 / 0
    Points
    1,083
    Level
    7

    ICD-2 Problem

    I met this problem many many times when I learned PIC two years ago.I think your mpu's connection is't right.Please try to get a board placing only one PIC and connect PIC to ICD2.



  8. #8
    Banned
    Points: 22,963, Level: 36

    Join Date
    May 2007
    Location
    USA & Canada
    Posts
    437
    Helped
    50 / 50
    Points
    22,963
    Level
    36

    ICD-2 Problem

    Did you checked the resistors in the MCLR



+ Post New Thread
Please login