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.

[SOLVED] Project to replace CY7C64613 in the ICD2

Status
Not open for further replies.
18f452 cannot validate target device

I have entered this site (posted by mk and Jay):

**broken link removed**

I could not understand what is written, but it has a schematic and PCB layouts.
Jay could you please translate all the text or it is already translated or contained in this thread ?
 

icd2 clone loose firmware

About 90KHz. All you need is the code below :)

main clrwdt
bsf gpio,osc
goto $+1
goto $+1
bcf gpio,osc
goto $+1
goto $+1
goto main

You can play with the frequency and duty cycle to get different voltages. The PICmicro here is a glorified oscillator.

If you change the 330 uH, then the frequency also need to be changed.

Cheers

Ravi

All right freq is 90-100KHz and what about duty cycle? Is it 50% or what?
 

icd2 unstable

predrage said:
All right freq is 90-100KHz and what about duty cycle? Is it 50% or what?

main clrwdt - 1 uS
bsf gpio,osc - 1 uS - ON
goto $+1 - 2 uS
goto $+1 - 2 uS
bcf gpio,osc - 1 uS - OFF
goto $+1 - 2 uS
goto $+1 - 2 uS
goto main - 2 uS

4 uS ON and 7 uS OFF. Duty cycle is not exactly 50%. Somewhere around 30% - 35%. This is not critical.

Cheers

Ravi
 

pic24fj32 circuit

OK I will play with this values and see what will happen. Thanks.
 

icd2 clone pic16f886

VoltageDrop,

use the USBMon tool it's shareware u can use it for 30 days. It's very helpful investigating issues like this. When you look at the data flow, check for bytes returned on Endpoint 2 (0x82). That's the data read from the 877. If it's all zero than check for proper connection of 877's busy pin I or Brem mentoined before.
 

debugger icdwarn0044

Microchip do not distinguish new ICD2's from old ones. The order number for ICD2 is the same and can not specify or identify whether your ordered one is made by either CY7C64613 or 18F4550.

Only package difference: DV164005 - standalone USB, and DV164007 - w/Power Adapter + RS232 cable.

But, old and new ICD2 can be identified by the part number on the back label of the genuine ICD2 main unit:

P/N is 10-00319-Rxx for old ICD2-CY7C64613, and
P/N is 10-00397-Rxx for new ICD2-18F4550,
where x or xx is the revision number. Either old or new unit still use 16F877 in genuine ICD2's. The new one shipped with a shorter 6-pin cable. I think the reason is for more stable signal transmission.(Remember the ICD2 modification for dsPIC , and someone on Microchip forum showed the coupling on PGC/PGD ...)

There are two or more factories to produce ICD2, so the following date is for reference only and may not be accurate:
It may be of the old veriosn if produced before Mar '06 and new version if produced after Apr '06.

Although I am just a user of ICD2, without any special connection with Microchip or their distributer/dealer. Hope my info is helpful to who is interested in new ICD2.
 

etekronics

VoltageDrop said:
I hooked up the 877a last night after I got the usb working and now when I try to download the OS it says that it's not an ICD2. I believe it read product ID 0x00 which was an ICD (1)? Does it sound like I'm just not getting data from the 877?

Hi VoltDrop

Has your 877A got a bootloader programmed in it?

I have built an ICD2 using Cypress chip and to get it going the 877A needs a bootloader which you can find in MPLAB ICD2 directory - file name BL010101.hex. Program the 877A and it will talk to the USB via its parallel port.

The Cypress chip will actually work without its sidekick IIC EPROM. It is more stable without it during Enumeration.

regards
Polymath
 

I have built a prototype with the info found here at this thread and with the boot posted by zedman, and everything works great.

Thanks to all that work very hard to make the clone of ICD2, with 18F4550, possible!
 

At some point during prototyping I hooked up the 877a without the rd/wr/cs lines and I think I corrupted the chip so I reflashed it and now it downloads the operating system. :lol: The only error I get now is "invalid target device id" which is OK since I have nothing hooked to the 877a output :wink: Things are looking good... I'm now convinced that it'll work so the layout work can now start! Is adjustable Vpp worth the trouble?
 

guys! don't you think that the 64 bytes written in the connect-disconnect process have some relation with the first 128 bytes of the boot.hex that mk says?
zedman, have you seen if the bytes are always the same or they are only ramdomly filled? maybe i'm getting insane with this ideas. :)
 

polymath said:
Hi VoltDrop

Has your 877A got a bootloader programmed in it?

I have built an ICD2 using Cypress chip and to get it going the 877A needs a bootloader which you can find in MPLAB ICD2 directory - file name BL010101.hex. Program the 877A and it will talk to the USB via its parallel port.

The Cypress chip will actually work without its sidekick IIC EPROM. It is more stable without it during Enumeration.

regards
Polymath

BL010101.hex from mplab directory is bootloader for 16F877. It won't work with 877A.
 

narccizzo,

I got scrambled 64 bytes earlier but now only 0x00s, since I wrote a small memory clean routine into the boot code.

It can be that MK knows the solution for this.

For 877A chips use the Zaphod's bootloader.
 

Hi. My ICD2 never corrupt flash. I work 2-3 weeks with it and everything is OK. Fast connect/disconnect doesn't corrupt flash for me.

Best Regards.
 

potyo said:
I have finished the schematic. Please check for errors. Probably have placed too many LED's, their function is:
LED1 - USB Connected
LED2 - Error
LED3 - Busy
LED4 - VDD is present on the target device
LED5 - VPP is present on the target's MCLR
LED6 - VPP source is working
LED7 - Power LED
J3 is to select ICD's power source (USB bus/target device). I don't know, why original ICD2 uses 74HC125 and 126, i have copyed this from the original's schematic. Anyone knows what is on the pin 6 of the original ICD2?
I hope, the board will be finished on the next weekend, but it's not sure(if i have test, that has higher priority). The schematic was drawn in Eagle, if you want, i can also upload the source files.

Has this been passed is it ok to go ahead and design make PCB for it

cheers

wizpic
 

predrage said:
polymath said:
Hi VoltDrop

Has your 877A got a bootloader programmed in it?

I have built an ICD2 using Cypress chip and to get it going the 877A needs a bootloader which you can find in MPLAB ICD2 directory - file name BL010101.hex. Program the 877A and it will talk to the USB via its parallel port.

The Cypress chip will actually work without its sidekick IIC EPROM. It is more stable without it during Enumeration.

regards
Polymath

BL010101.hex from mplab directory is bootloader for 16F877. It won't work with
877A.

Sorry predrage
got my files mixed
Attached is the bootloader I used for my build - enables OS to be loaded by Debugger Menu in MPLAB - reflashed my 877A just to make sure it was right one

regards polymath
 

PIC Programming Voltage - Vpp

There are hundreds of PIC models. As I know, most of the common PICs support Vpp range from Vdd+3.5V (or 9V, 10V) minimun to 13.25/13.5V maximun, and traditional 84/84A use 12-14V. So 12-13V programming voltage is choosen in most programmers. But some of the PICs, e.g. 16F91X, 16F68X, etc (16F ProgSpec 3 series) use 10-12V for programming.

Original ICD2 use a digital POT chip (control through SPI interface) and a switching regulator to adjust Vpp and providing different Vpp to the spec of the target PIC. Whether requiring Vpp adjustment or not may depends on the PICs to program. IMHO, if digital POT is not implemented, at least a jumper pin for switching 12.5V to 11-11.5V is suggested.

ICD pin 6

The 6-pin ICD connecter is defined since early ICD (ICD 1) year. It is connected to RB3/PGM of target 16F877. In the CCS ICD, this pin is marked "optional, used for advance debugging".

In ICD2, the pin 6 is just marked as "not used". I have not found any real usage in any document until now. It seems there are still some circuit inside ICD 2, maybe for future use? If anyone want to find out the exact action on this pin, to trace ICD2 firmware is suggested. Addition note: For those PICs with LVP feature, the PGM of target PIC should be keep low for usual high voltage programming using Vpp.
 

hi zedman, i didn't found the clrf 0xf0 instruction in your hex file?

Added after 6 minutes:

ravimarcus, i build the pickit2 and it wors very well..
 

rkodaira, your help is still needed, if you could build a little programmer and read these 128 bytes, i still think that the uC isn't write protected.
 

finally I found the error that doesn't leave my circuit works, I still don't know why but if i program the 877a with the 877aboot.hex from zedman (without os, i think), the MPLAB fails to comunicate with icd2, but if the 877a uC already contains an os, it works perfectly and update the os if the version its older, i had the same problem with the icd2 rs232 version, i had to get the fw with some os inside, maybe someone knows why.
however, i have the same problem that every connect-launch process the MPLAB downloads the os into the 4550 just like zedman.
the new problem that i have its that the icd2 doesn't recognize the target device id, i've tried several uC and the readed id doesn't match with the id expected
i.e
Connecting to MPLAB ICD 2
...Connected
Setting Vdd source to target
ICDWarn0020: Invalid target device id (expected=0x92, read=0x1)
...Reading ICD Product ID
Running ICD Self Test
...Passed
MPLAB ICD 2 Ready

so i checked the voltages for the diferent actions with a multimeter
mclr low=0.6V
mclr high=4.10V
mclr vpp=12.8V

i used the schematic 0536_004.gif posted before (opamp lm358)
so whats wrong with this?

hi zedman, i didn't had the overwritten thing, do you still have that problem?

Added after 8 minutes:

i'm fedding the lm358 with external 15V
 

I haven't posted any hex for the 877. I just said use Zaphod's firmware for a 877a chip.

Anyway narccizzo:

ICDWarn0020: Invalid target device id (expected=0x92, read=0x1)

this mean no target chip attached or ICD2 cannot recognize it.

Added after 1 minutes:

Currently Iam busy with other things, haven't got much time for testing, but with the boot block copy protection I don't have the overwriting bug.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top