Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Need help to make USB icd2clone work ( 4550 & 877A versi

Status
Not open for further replies.

ech

Junior Member level 2
Joined
Feb 19, 2005
Messages
23
Helped
1
Reputation
2
Reaction score
0
Trophy points
1,281
Location
Belgium
Activity points
1,592
unable to re-program icd2 usb os firmware.

I built the icd according to the info posted by PiCS
there: **broken link removed**
( top of page 16)

I didn"t want to "pollute" the other thread with my struggling so I created another one.
Here is what I did after having the VPP voltage solved (see previous thread) thanks for the very helpfull advice there...



1- Reprogram new PICs

2- Insert new pics into icd ( no target device connected, 20MHZ crystal C8 = 220nf)

3- Connect icd: D4 & D5 are on ( widnows makes its "happy" sound notifying me that the device is plugged)
Microchip MPLAB ICD 2 firmware client is present in device manager

4- launch MPLAB ( 7.31))

5- Select icd as debugger ( auto connect is on)
Here is the output:
Code:
Connecting to MPLAB ICD 2 
...Connected
Then I hear notification from windows: Unplugged, Plugged, Unplugged, Plugged
then the following output
Code:
ICDWarn0054:  MPLAB IDE has lost communications with the MPLAB ICD 2.  Would you like to attempt to reconnect?
Connecting to MPLAB ICD 2
...Connected
ICD0286: Unable to communicate with ICD
ICD0082: Failed MPLAB ICD 2 operation
MPLAB ICD 2 Ready


if I run the self tests ... I get this output
Code:
Running ICD Self Test
ICDWarn0054:  MPLAB IDE has lost communications with the MPLAB ICD 2.  Would you like to attempt to reconnect?
Connecting to MPLAB ICD 2
...Connected
ICD0286: Unable to communicate with ICD
ICD0082: Failed MPLAB ICD 2 operation

Could someone help me to sort out this problem.. ( I'm struggling since one week.....)
What info should I try to provide to allow someone to help me ( I don't have any fancy tools like scope or logic analyser....)

Can someone validate those assumptions:

The fact that windows detects the device means that:
- the 4550 works correctly
- the usb communication is good
- I should concentrate on the 877A
- the fact that D2 lit when I tried to donnload the firmware meand that the 877A is at least running ( clock ok ??) ???

- In the ICD documentation, I read that a target device must be connected in order to debug..
- is a target board needed to complete the self tests ?
- should I donwload manually a firmware in the icd ??
- Actually , I tried but MPLAB blocks at ...
Code:
  Connecting to MPLAB ICD 2
...Connected
ICDWarn0054:  MPLAB IDE has lost communications with the MPLAB ICD 2.  Would you like to attempt to reconnect?
Connecting to MPLAB ICD 2
...Connected
ICD0286: Unable to communicate with ICD
ICD0082: Failed MPLAB ICD 2 operation
MPLAB ICD 2 Ready
Connecting to MPLAB ICD 2
...Connected
ICDWarn0054:  MPLAB IDE has lost communications with the MPLAB ICD 2.  Would you like to attempt to reconnect?
Connecting to MPLAB ICD 2
...Connected
ICD0286: Unable to communicate with ICD
ICD0082: Failed MPLAB ICD 2 operation
MPLAB ICD 2 Ready
Downloading Operating System
then only the progress bar in the status bar

I tried to abort it and then the icd wasn't detected by windows anymore.. had to erase and reprogram the 4550...[/code]
 
Last edited by a moderator:

icd2 usb 4550

HI
I have the same problems since 3 days and i can not resolve this problem

we need help please

thank you in advance
 

    ech

    Points: 2
    Helpful Answer Positive Rating
unable to re-program icd2 usb os firmware

Hi!

I had similar problems with my clone and did not succeed until I removed the "OS available" check from the 4550.

Here is the HEX from zedman? that I have modified to skip the OS test and jump to it.

Best Regards,
Manuel
 

    ech

    Points: 2
    Helpful Answer Positive Rating
icd2 4550

HI manuel 1139
The same prob:
Connecting to MPLAB ICD 2
ICDWarn0059: About to re-program ICD2 USB Boot firmware code. Please do NOT disconnect the ICD2 or interrupt this operation!
...Connected
ICD0082: Failed MPLAB ICD 2 operation
MPLAB ICD 2 Ready

Thank you for your help
 

    ech

    Points: 2
    Helpful Answer Positive Rating
18f4550 condensadores

manuel1139 said:
Hi!

I had similar problems with my clone and did not succeed until I removed the "OS available" check from the 4550.

Here is the HEX from zedman? that I have modified to skip the OS test and jump to it.

Best Regards,
Manuel

Just tried with your firmware... nope, still the same behabiour
..
Thanks!
Ech
 

Схема usb для fms

maybe there are some problem ocur.
(1)I think you should debugger your PIC16F877A's code.
maybe the PIC16F877A have not work
(2) you must debug your serial port cable,the cable must be pin2,pin3 pin7,pin8 and pin5 work.may be your cable is only the pin2,pin3 and pin5 work
(3)you must have the correcte bootloader in your pic16f877a or pic16f877,and these two chips have not the same bootloader.
 

usb icd2 4550

lyxer said:
maybe there are some problem ocur.
(1)I think you should debugger your PIC16F877A's code.
maybe the PIC16F877A have not work
(2) you must debug your serial port cable,the cable must be pin2,pin3 pin7,pin8 and pin5 work.may be your cable is only the pin2,pin3 and pin5 work
(3)you must have the correcte bootloader in your pic16f877a or pic16f877,and these two chips have not the same bootloader.

Thanks for your input but!
- I tried with 3 differents PIC16 and 3 PIC18..
- It's an USB icd not a serial one --> no serial cable
- it's a PIC 16F877A --> the bootloader from PiCS is the correct one

Regards,
Ech

Added after 2 hours 43 minutes:

Update:

I installed usbmon, and I get usb traffic in my logs ( alternance of send & recieve) so I assume the usb communication is right.

but then... what's wrong... should I look more closely to the communication between the pics or the usb trafic implies that the 16F877a is working too ???
Regards,
ech
 

icd2.5 usb device not recognized

ech said:
2- Insert new pics into icd ( no target device connected, 20MHZ crystal C8 = 220nf)
C8, is it 220 nF or 22 pF ???
ICDWarn0054: MPLAB IDE has lost communications with the MPLAB ICD 2. Would you like to attempt to reconnect?
Here ICD2 means 16F877A and not 18F4550. Check that the 877A circuit is working properly .... oscillator, MCLR, VCC etc.... The 4550 is equivalent to the cypress chip and not the ICD2. 4550 is a bridge between USB and 877A just like the cypress chip.

Cheers

Ravi
 

    ech

    Points: 2
    Helpful Answer Positive Rating
potyo

ravimarcus said:
ech said:
2- Insert new pics into icd ( no target device connected, 20MHZ crystal C8 = 220nf)
C8, is it 220 nF or 22 pF ???
ICDWarn0054: MPLAB IDE has lost communications with the MPLAB ICD 2. Would you like to attempt to reconnect?
Here ICD2 means 16F877A and not 18F4550. Check that the 877A circuit is working properly .... oscillator, MCLR, VCC etc.... The 4550 is equivalent to the cypress chip and not the ICD2. 4550 is a bridge between USB and 877A just like the cypress chip.

Cheers

Ravi
Thanks
I tried with C8 = 330nf like the schematics and then with a 220nF like in the datasheet!
Both woirked the same , but without C8, windows didn't detect the device.


OTOH, Do I need to apply power on the target connector as implied in the microchip icd2 documentation ??

- after plugging the device, I read
- 5V at VDD , MCLR
- +/- 2.5v at pin 13 of 16F ( assuming that clock is clocking)
- I Checked "continuity" between //port of both pics.... and everythinh seems ok..
 

working_icd.rar

I would say you have an issue with the communication between 4550 and 877 then... are you able to add the parts for the serial type of programmer? Should only be a max232 + 5,1zener. Then you can test the 877 part of the circuit. About the 4550 I would say it is reprogrammed by MPLAB and then restart of the 4550 with OS and communication to 877 failed...

Best Regards,
Manuel
 

    ech

    Points: 2
    Helpful Answer Positive Rating
windows::getlasterror() = 0x0 pic usb

manuel1139 said:
I would say you have an issue with the communication between 4550 and 877 then... are you able to add the parts for the serial type of programmer? Should only be a max232 + 5,1zener. Then you can test the 877 part of the circuit. About the 4550 I would say it is reprogrammed by MPLAB and then restart of the 4550 with OS and communication to 877 failed...

Best Regards,
Manuel

Thanks,

Would it be possible that something is wrong with the booloader programmation in the 16F ???

I use pic burner from there **broken link removed**
with the sofware from sprut.de ( pbrenner37 for 16F and p18_16 for 18F)

in case of the 877, i just do an aut detect then load the .hex then erase & burn.

Is there any needs to modify the config bits ??

Thanks Again
Regards
Ech...

PS: When I try to "download Operating system", D2 led lit... Does that means that the communication is working betwwen the two PICS ????? BTW, how long does it takes to download the operating system into the 16F ???
 
Last edited by a moderator:

icd0151

I know this will be obvious and known to many but
have you got the correct Windows deriver installed?

I have run my Cypress ICD2 clone WITHOUT the 877A
USB Enumeration completes OK -- monitored by SniffUSB Version 1.7

MPLAB 7.40 returns:
...............................
ICD0021: Unable to connect with MPLAB ICD 2
MPLAB ICD 2 Ready
...............................
showing a Cypress(4550)<-->877A fault and NOT a USB fault


Your error reports show a 4550<-->Windows comms failure
Windows will recognise ICD2-USB using its default driver but MPLAB
via Windows will not.

The ICD2 will ONLY work with the Microchip USB driver
It will NOT work with the default Windows USB driver
Microchip provide full details on installing ICD2 driver

For clarity:

Target <--(ICSP)--> 877A <--(Mchip parallel)--> 4550(Cypress) <--(USB)-->
PCHardware <--(MchipUSBDriver)--> Windows <--(Dlls etc.)--> MPLAB

hope this helps Polymath
 

    ech

    Points: 2
    Helpful Answer Positive Rating
icdwarn0020 +0x1ff

polymath said:
I know this will be obvious and known to many but
have you got the correct Windows deriver installed?

I have run my Cypress ICD2 clone WITHOUT the 877A
USB Enumeration completes OK -- monitored by SniffUSB Version 1.7

MPLAB 7.40 returns:
...............................
ICD0021: Unable to connect with MPLAB ICD 2
MPLAB ICD 2 Ready
...............................
showing a Cypress(4550)<-->877A fault and NOT a USB fault


Your error reports show a 4550<-->Windows comms failure
Windows will recognise ICD2-USB using its default driver but MPLAB
via Windows will not.

The ICD2 will ONLY work with the Microchip USB driver
It will NOT work with the default Windows USB driver
Microchip provide full details on installing ICD2 driver

For clarity:

Target <--(ICSP)--> 877A <--(Mchip parallel)--> 4550(Cypress) <--(USB)-->
PCHardware <--(MchipUSBDriver)--> Windows <--(Dlls etc.)--> MPLAB

hope this helps Polymath

Is it the correct driver ???? ( see attached screenshot)
Thanks ..
Etienne
 

icd0152 usb

ech

it appears that you have got Microchip's driver installed.

I have just programmed a 4550 with OS from other thread - credit to all who
contributed to the reverse engineering.

reset my 4550 - plugged in USB - enumerated correctly
(faster than Cypress - no Loader)
opened MPLAB selected ICD2 Programmer

MPLAB responds:
..................................

Connecting to MPLAB ICD 2
ICD0289: Unable to re-program ICD2 USB OS firmware.
ICD0021: Unable to connect with MPLAB ICD 2
MPLAB ICD 2 Ready

.................................
obviously MPLAB cannot reprogram my 877A which does not exist.

--------------
seems that your problem is USB on the 4550

can you remove your 877A and check that your 4550 enumerates OK
with above MPLAB response?

hope this helps Polymath
 

    ech

    Points: 2
    Helpful Answer Positive Rating
icdwarn0054

polymath said:
ech

it appears that you have got Microchip's driver installed.

I have just programmed a 4550 with OS from other thread - credit to all who
contributed to the reverse engineering.

reset my 4550 - plugged in USB - enumerated correctly
(faster than Cypress - no Loader)
opened MPLAB selected ICD2 Programmer

MPLAB responds:
..................................

Connecting to MPLAB ICD 2
ICD0289: Unable to re-program ICD2 USB OS firmware.
ICD0021: Unable to connect with MPLAB ICD 2
MPLAB ICD 2 Ready

.................................
obviously MPLAB cannot reprogram my 877A which does not exist.

--------------
seems that your problem is USB on the 4550

can you remove your 877A and check that your 4550 enumerates OK
with above MPLAB response?

hope this helps Polymath

Thanks for your help !
I just tried yesterday, and without the 877, the usb device is not recognized at plug in time.

Regards
Ech
 

movlw 0x8

HI Ech

finaly i get a woekink icd with this files try it .the target is 16f873
 

    ech

    Points: 2
    Helpful Answer Positive Rating
icd2_usb_4550

I notice that both the PIC16F877 and the PIC16F877A are mentioned in this thread.

the 877 is nolonger listed by Microchip and is superceded by the 877A

the bootloader code is different for each device - refer to original thread

the 877A is a lot faster to re-programme as it writes 8 words at a time
(the silicon is also a lot faster - 877 fails at ~28MHz - 877A runs well at 40MHz)

this speed difference is a great advantage when using the 877A as a target device - (from experience)
- my best advice is to use an 877A in the ICD2 and 877A as a target device
... if you have spare 877s then develop code on 877A target and use the final code in an 877 application.

Remember the silicon differences between the two devices - see:
https://ww1.microchip.com/downloads/en/DeviceDoc/39591a.pdf
or
https://www.microchip.com/downloads/en/DeviceDoc/39591a.pdf

regards Polymath
 
Last edited by a moderator:

    ech

    Points: 2
    Helpful Answer Positive Rating
pic 4550 + driver + microchip

polymath said:
I notice that both the PIC16F877 and the PIC16F877A are mentioned in this thread.

the 877 is nolonger listed by Microchip and is superceded by the 877A

the bootloader code is different for each device - refer to original thread

the 877A is a lot faster to re-programme as it writes 8 words at a time
(the silicon is also a lot faster - 877 fails at ~28MHz - 877A runs well at 40MHz)

this speed difference is a great advantage when using the 877A as a target device - (from experience)
- my best advice is to use an 877A in the ICD2 and 877A as a target device
... if you have spare 877s then develop code on 877A target and use the final code in an 877 application.

Remember the silicon differences between the two devices - see:
https://ww1.microchip.com/downloads/en/DeviceDoc/39591a.pdf
or
https://www.microchip.com/downloads/en/DeviceDoc/39591a.pdf

regards Polymath

As far as I am concerned, I only own 16F877A chips !

Regards
 
Last edited by a moderator:

hex 4550 icd

selimt said:
HI Ech

finaly i get a woekink icd with this files try it .the target is 16f873

I programmed your firmwares...
here is the result ( mplab (7.40) was configured for a 18f4620)

Code:
Auto-connect not enabled - Not connecting (Try enabling auto-connect on the ICD2 settings pages.)
Connecting to MPLAB ICD 2
ICDWarn0059: About to re-program ICD2 USB Boot firmware code. Please do NOT disconnect the ICD2 or interrupt this operation!
...Connected
ICDWarn0031: MPLAB ICD 2 contains the incorrect operating system for the selected device.  Would you like to download the correct operating system?
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
ICDWarn0059: About to re-program ICD2 USB Boot firmware code. Please do NOT disconnect the ICD2 or interrupt this operation!

( I've been patient for about 10 minutes.. ( still the progress bar in the status bar..)

I'm about to give up and etch a new pcb to start from scratch...
Regards,
Ech
 

icd0286

Hi,

I also built the ICD2 clone using the PCB uploaded by PiCS. However I did not use the hex file he uploaded and therefor I had to add a >= 10K pull-up resistor to the 4550's MCLR pin.

Maybe this helps somebody.

Cheers

Johann
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top