Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

ICD2 problem!!

Status
Not open for further replies.

amitkb

New Member
i'm trying to program PIC24FJ128GA006 using Microchip's ICD2. But i get the following error
Connecting to MPLAB ICD 2
...Connected
Setting Vdd source to target
ICDWarn0020: Invalid target device id (expected=0x407, read=0x0)
...Reading ICD Product ID
Running ICD Self Test
...Passed
MPLAB ICD 2 ready for next operation

i'm assuming that it has something to do with the pin that's missing,

target vdd:3.20
target vpp: 3.16(as shown in MPLAB)

>>i'm using ICD2 through USB and powering it through the target device(i.e 3.3V)
>> i have connected MCLR pin to Vdd thru a 10K.
>> i have also given AVdd to 3.3V and grounded AVss
>> i have enabled on-chip regulator by connecting ENVReg to Vdd and VddCore to Vss thru a 10 microfarad cap
>> i have not connected any external oscillator
kindly help!!!
 
Where are the clock and data lines of the ICD2 connected to?

You need Vss and Vpp connected from the ICD2 and the PIC.

PGC and PGD on the ICD2 need to be connected to either PGC1 and PGD1 or to PGC2 and PGD2.

It is usually easiest to connect Vdd from the ICD2 to Vdd on the PIC. It is possible to program without.
 
i have connected following pins on RJ12 socket to MCu
pin 1 on RJ12 --> MCLR
pin2 ---> Vdd
pin3 ---> Vss
pin4 ---> PGD2
pin5 ---> PGC2
pin6 ---> left unconnected

it clears the self-test but does not read reqd chip id
 
yes, there is option in MPLAB IDE where i have set it for PDX2. i have also set the programmer to ICD 2
 
Last edited:
ok...but there is option in MPLAB IDE where we can change to PGx2 .
anyways i will try it. thnx.
also i have not connected any external oscillator since there is an internal oscillator. will that cause any prob???
also since i am powering icd2 thru target device. is the voltage sufficient?? or shd i power the target device thru the icd2 itself?? in case i power the target device thru icd2 will it be a problem bcoz my PIC's Vdd is 3.3V??
 
Last edited:
shd all the I/O pins be in high impedence mode(i.e connected to Vdd) during programming??

No, all that needs connecting is the five connections to the programmer, nothing else.

I've also no idea what you mean by 'high impedance mode' or what 'connected to Vdd' has to do with it?.
 
now ICD2 is identifying the chip but it is giving the following error.
i'm using MPLAB IDE 8.3v..is that an issue??
or am i making any mistake in IDE settings?



Connecting to MPLAB ICD 2
...Connected
Setting Vdd source to target
Target Device PIC24FJ128GA006 found, revision = Rev 0x3007
...Reading ICD Product ID
Running ICD Self Test
...Passed
MPLAB ICD 2 ready for next operation
Programming Target...
...Erasing Part
...Programming Program Memory (0x0 - 0x3FF)
Verifying...
...Program Memory
ICD0161: Verify failed (MemType = Program, Address = 0x80, Expected Val = 0x3F6, Val Read = 0xFFFFFF)
ICD0275: Programming failed.
MPLAB ICD 2 ready for next operation

plz help!!!
 
now the chip is programming :)
all i did was erase the chip then read the memory using tab buttons on IDE and then program the chip. now the message program successful appears :)
thnx for the all the above inputs, really appriciate it. :)
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top