ICSP problem with PIC18F46K22

Thread Starter

jean120

Joined Jan 24, 2016
75
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!!
 

jpanhalt

Joined Jan 18, 2008
11,087
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
 

Thread Starter

jean120

Joined Jan 24, 2016
75
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
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:

Thread Starter

jean120

Joined Jan 24, 2016
75
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.
Dear dannyf ,what is the problem with my post?I tried to explain clearly what is going on!!
 

ErnieM

Joined Apr 24, 2011
8,377
A Target Device ID of 00000000 simply means no data was returned to the ICD from the PIC.

PIC18(L)F2X/4XK22 Data Sheet said:
24.7 In-Circuit Serial Programming
PIC18(L)F2X/4XK22 devices can be serially
programmed while in the end application circuit. This is
simply done with two lines for clock and data and three
other lines for power, ground and the programming
voltage.
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:

jpanhalt

Joined Jan 18, 2008
11,087
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
 

Thread Starter

jean120

Joined Jan 24, 2016
75
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,
 
Top