• 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 Testing,Trouble Shooting

GRC

New Member
After building and rebuilding the ICD2 on STOLZ's site several times my
circuit will not function. My VPP is about 13.5vdc, the 16F876A has the
"ICD2_Bootloader_A.hex" programmed into it. The transistors are new
and appear to be connected correctly. The caps seem to be correct
on the MAX232 along with the connections the PIC. FIFO buffers are
set correctly.

What can be done to find the problem?
Is a target PIC required to establish communication with the ICD2 and MPLAB 6.60 for downloading the operating system?
I'm at a lost on what to try next.

Any ideas are more than welcomed
Thanks in advance
Gordon
 

Mike - K8LH

Well-Known Member
Hi Gordon,

May I ask if you've gone into <Programmer>, <Settings>, and <Communications> menus and selected the correct serial port before trying to connect?

What dialogs are you getting?

Regards, Mike
 

GRC

New Member
Hi Mike I've tried your suggestion and still get the same results.

Connecting to MPLAB ICD 2
ICD0021: Unable to connect with MPLAB ICD 2
ICD0021: Unable to connect with MPLAB ICD 2
MPLAB ICD 2 Ready
Downloading Operating System
ICD0021: Unable to connect with MPLAB ICD 2
...Download Operating System Failed
ICD0024: Failed to write to Com Port (<Unknown>) (MPLABCOM = 0x0) (USBCOM = 0x0) (0x461)
ICD0082: Failed MPLAB ICD 2 operation
ICD0082: Failed MPLAB ICD 2 operation
ICD0082: Failed MPLAB ICD 2 operation
ICD0082: Failed MPLAB ICD 2 operation
MPLAB ICD 2 Ready


Thanks for the fast reply.
Any more ideas/suggestions?

Thanks
Gordon
 

Mike - K8LH

Well-Known Member
Hi Gordon,

I first goto the <Programmer> menu, then I choose "MPLAB ICD 2" from the <Select Programmer> menu and here's what it says in the MPLAB ICD 2 output window;

Auto-connect not enabled - Not connecting (Try enabling auto-connect on the ICD2 settings pages.)

Then I work my way through the <Programmer>, <Settings>, and <Communications> menus and I select the Com1 port and 19,200 baud and click OK... Finally, I click on the Reset and Connect to ICD button and I get the following messages in the MPLAB ICD 2 output window;

Auto-connect not enabled - Not connecting (Try enabling auto-connect on the ICD2 settings pages.)
ICDWarn0034: Please ensure that your system's serial FIFO buffers are disabled.
Connecting to MPLAB ICD 2
...Connected
ICDWarn0030: MPLAB ICD2 is about to download a new operating system. If MPLAB IDE is just starting, it will appear to "hang" at the splash screen. Please be patient. MPLAB IDE will finish it's intialization after the OS is downloaded. (Note: You may wish to select to ignore this warning in the future.)
Downloading Operating System
Connecting to MPLAB ICD 2
...Connected
Setting Vdd source to MPLAB ICD 2
ICDWarn0020: Invalid target device id (expected=0x88, read=0x0)
...Reading ICD Product ID
Running ICD Self Test
...Passed
...Download Operating System Succeeded
Setting Vdd source to MPLAB ICD 2
ICDWarn0020: Invalid target device id (expected=0x88, read=0x0)
...Reading ICD Product ID
Running ICD Self Test
...Passed
MPLAB ICD 2 Ready

Those are the messages I get when I don't have a target device connected...

Are you following a similar procedure?

Regards, Mike
 

GRC

New Member
Hi Mike
Yes I'm using a straight through serial cable(not a null modem cable).
Went through the process you suggested in your previous post.
Never seems to connect with MPLAB. Comm 1, 19200 baud.


Must be my circuit, the 7805 gets fairly warm. Almost hot to the touch.
Recall reading in an older post someone used a "transistor tree" instead
for thier ICD2. I'll take a look at that and see if might help.

By the way Mike I'm a Michigan boy too.

Thanks again
Gordon
 

GRC

New Member
Hey Jay
Just missed your reply. To disable the FIFO, I set the Flow to "hardware",
as recommended by the MPLAB help file. Is this correct?

Thanks
Gordon
 

GRC

New Member
Ahh
Now I see, missing one small thing on the FIFO.
Going to give this another try. Will let you now if it
works.

Thanks Jay
Gordon
 

GRC

New Member
Still having trouble after trying several times.

Connecting to MPLAB ICD 2
ICD0021: Unable to connect with MPLAB ICD 2
ICD0021: Unable to connect with MPLAB ICD 2
MPLAB ICD 2 Ready
Connecting to MPLAB ICD 2
ICD0021: Unable to connect with MPLAB ICD 2
ICD0021: Unable to connect with MPLAB ICD 2
MPLAB ICD 2 Ready
Connecting to MPLAB ICD 2
ICD0021: Unable to connect with MPLAB ICD 2
ICD0021: Unable to connect with MPLAB ICD 2
MPLAB ICD 2 Ready
ICDWarn0034: Please ensure that your system's serial FIFO buffers are disabled.
Connecting to MPLAB ICD 2
ICD0021: Unable to connect with MPLAB ICD 2
ICD0021: Unable to connect with MPLAB ICD 2
MPLAB ICD 2 Ready

One thing that I did notice is that VPP drops to 11.46 VDC
when trying to connect to PC. When disconnected its over 13 VDC.
Will this cause any issuses?


Gordon
 

Jay.slovak

Active Member
Don't waste time with measuring Vpp, you have to establish communication first.
Have you tried "Upload ICD2 operating system" menu item? This will program new OS to the ICD2. (and because your ICD2 has only bootloader code inside, you can't connect). After the OS is inside, then it should work.
 

GRC

New Member
Hi Jay
If I understand correctly, the ICD2 will never connect until the OS has
been uploaded?
If so, the only way to test the ICD is to try uploading the OS?

Ok, I give it a try.
 

Jay.slovak

Active Member
GRC said:
Hi Jay
If I understand correctly, the ICD2 will never connect until the OS has
been uploaded?
If so, the only way to test the ICD is to try uploading the OS?

Ok, I give it a try.
Exactly! After the OS is loaded, you can check your voltages (as sensed by ICD2, viewable in MPLAB)
 

GRC

New Member
Hi again Jay
No luck uploading the OS.
These are errors/warning I recieve.

Connecting to MPLAB ICD 2
ICD0021: Unable to connect with MPLAB ICD 2
ICD0021: Unable to connect with MPLAB ICD 2
MPLAB ICD 2 Ready
Downloading Operating System
ICD0021: Unable to connect with MPLAB ICD 2
...Download Operating System Failed
ICD0024: Failed to write to Com Port (<Unknown>) (MPLABCOM = 0x0) (USBCOM = 0x0) (0x461)
ICD0082: Failed MPLAB ICD 2 operation
ICD0082: Failed MPLAB ICD 2 operation
ICD0082: Failed MPLAB ICD 2 operation
ICD0082: Failed MPLAB ICD 2 operation
MPLAB ICD 2 Ready


When attempting to load OS this the file MPLAB gives for me to use

ICD01020603

Does this sound right?
If everything is correct with the MPLAB, then my circuit is at fault.
Can you explain your ICD2 a little, does it differ from the one on
Stolz's site? Transistor tree maybe?

Thanks Jay
Gordon
 

Jay.slovak

Active Member
That file is OK.

Did you restart your PC after you disabled the FIFO? Are you sure that ICD2 is connected to the same port (which has disabled FIFO and which is setup in MPLAB)?

My version is kind of special, look here.
 
Last edited by a moderator:

cbraga

New Member
To me, that error ("Failed to write to Com Port") is a PC problem. MPLAB can't get to the serial port. Check you picked the correct port, check it's enabled in the BIOS, connect another serial device to the same port to make sure it works.
 

GRC

New Member
Thanks for the help guys.
Besides the LPT port, and the usb port, this is the only comm port.
Its also the port used for for my Basic Stamps and Basic Atoms
(works well with those devices). So I think the comm port is ok.
The only thing I have not tried is to change the Max232 chip. Do
have an extra one on hand. I'll replace this and give it another go.
Using MPLAB 6.60, since I recall reading that the MPLAB 7.0 and
up will not work with Stolz's ICD2. Is this true?
Thanks for the picture of your ICD2 circuit Jay. Like the Busy and
Error LEDs that arent on Stolz's.

Gordon
 

Jay.slovak

Active Member
This ICD2 is fully compatible with all MPLAB versions. Right now, I am programming 10F206 under MPLAB 7.30 (MCLR disabled :p )
So don't worry about this.
 

Latest threads

EE World Online Articles

Loading

 
Top