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.
In previous posts, somebody posted a link to microchip forums which has information about it (i'll post it later because i haven't the info here).

Anyway you have to set your code propertly in order to debug.

When arrive at home I'll post all i know and a working example with 16f877a (blinks a led).


Cu late.
 

blueroomelectronics said:
Does your 16F887A have the oscillator configured correctly? You must have a running clock to use the debugger.

Yes, i have a 12 Mhz clock with two 22pF capacitor :S

Added after 12 minutes:

alunaro said:
In previous posts, somebody posted a link to microchip forums which has information about it (i'll post it later because i haven't the info here).

Anyway you have to set your code propertly in order to debug.

When arrive at home I'll post all i know and a working example with 16f877a (blinks a led).


Cu late.

Gracias por tú respuesta, esperaré tú ayuda.
Esto es lo que hago:
*Le conecto al 16F877A las 5 lineas correspondientes del ICD2
*Le agrego un capacitor de 12 Mhz y sus capacitores de 22pF
*Le conecto una resistencia de 10K a MCLR [ Vdd--´\/\/`--MCLR]
*Selecciono el ICD2 como Debugger
*Compilo el proyecto
*En la pestaña "Debugger" selecciono "connect" y después "program"
*La programación es correcta pero me indica el error "ICD0083" donde me dice que no puedo entrar al modo debugger

*Entonces selecciono de la pestaña "program" el ICD2
*Le doy en "programm" y se realiza de manera correcta pero el PIC no hace nada
*Desconecto la linea Vpp del PIC y entonces empieza a parpadear

Espero me explique y me puedan ayudar :|
 

Please, english. 1. Forums are in english. 2. Not all people know spanish neither other idioms.

Well, let's go:

*The link to microchip forum where found the different problems behind that error code, is: **broken link removed**

*In the source file, you can find some notes about debugging. In order to use debug mode, firmware must be modified; A normal program won't work in debug mode. Mainly:

1. mount your circuit as usual
2. ADD to __config directive _LVP_OFF and _DEBUG_ON
3. Put a NOP instruction in program address 0x0000
4. take care of resources used by ICD2 to debug, like I/O pins.

In MPLAB, select ICD2 as programmer, load your project, build, and download to PIC. Set a breakpoint where you want and just run.

Don't forget to disable previous settings if are not going to use debug mode, otherwise it won't work propertly.

In normal mode (programing), don't need to unplug the vpp wire. Just use the "release on reset" or "hold on reset" buttons (upper-right corner in mplab, near to programming buttons). These buttons let you put the pic in a constant reset state or running state. Consult help... ALL IS IN MPLAB HELP.

Main advise: read.

Late.
 

alunaro said:
In MPLAB, select ICD2 as programmer, load your project, build, and download to PIC. Set a breakpoint where you want and just run.

Hi Alunaru. Thanks for your help.

In MPLAB, select ICD2 as debugger, load your project, build, and download to PIC. Set a breakpoint where you want and just run.

i think is it the correct

Added after 5 hours 10 minutes:

Hi! i found a solution, changed the crystal of 12 Mhz to 4 Mhz, Debugging works perfectly :D

Someone know why not work with 12 mhz crystal?
 

hi,
i got a question about the potyo2 schematics. what is the difference of 10k/1% and 10k resistor? is it meant that a potentiometer? thx to anyone that could help
 

blueroomelectronics said:
Make sure the oscillator is set to HS

i'm found the problem, my protoboard is bad :S i'm changed the proto and set HS oscillator and work perfectly. Thanks!
 

ad_tech said:
elec_gu said:
To ad_tech:
First of all. Thank you for your answer.:D
I'm going to scope data and clock lines in order to measure timing. I'll do some comparison 5V vs 3.3v.

Tanks again for your answer. For me this is a sad history. First, I tried to do a USB ICD2 by myself following this page, but it was over my capabilities (double side board etc). Then I bought one by eBay. The seller ad stated it was 3.3v capable, but as far as I can say, it isn't. My following step should be to buy Microchip original one. As you can see, a long, stupid and expensive way of doing things :cry:

To : elec_gu
Your story is troubling me.
I ordered some PIC24F and PIC24H a couple of days back.
I guess I may run into problems as you did.

This is just a dumb question. Are you connecting AVDD and AVSS as described in page 46 footnotes 1 and 2 of the PIC24F programming specifications (DS39768B)?

Is there any one out there who has worked with PIC24F/H and ICD2 clones successfully ?

I just made a side by side comparison of the programming timing requirements for PIC18F2xx and PIC24Fx and the results are very interesting to say the least.

To be quick about it, I will only mention 3 parameters of the PGC line.
Clock low, Clock high and Clock period

PIC 18F2x @ 2V 400 ns 400 ns 1000 nS
PIC 18F2x @ 5V 40 ns 40 ns 100 ns
PIC 24Fxx @ 3.3V 40 ns 40 ns 100 ns

This means that the ICD2 OS for PIC18F2x needs to adjust it's timings according to target VDD.
As you can see, clock timing for PIC18 @ 5V and PIC24F @3.3V is the same, but while programming PIC24F, the transmitting buffer is being supplied @ 3.3V which makes it a slower device while the timing requirements remain the same.

I'm guessing that, due to the larger memory of the 24F chips, MICROCHIP has probably ' squeezed ' as much as possible the programming timings to speed up matters.
This may also account for your problems with 24F and not with other devices.

To potyo:
You are right about programming PIC16LFx at low voltage. It can be done.
But the fact is that both buffers and PIC16LFx become slower at low voltages, and ICD2 firmware takes that into account when generating clock and data signals.
The problem is that PIC24 is programmed at a fixed voltage,(according to datasheet) so there is no need to ' adjust timings '.
At 3.3V 74HC devices might just be a tiny bit too slow.

Is there any proud owner of an original ICD2 on the house that could inform us about what type of buffers MICROCHIP ICD2 uses ?

A final note before I go:
As you can all see I joined this forum recently.
It took me about a week to read (several times ) all the messages posted here and one thing became immediately obvious to me.
Less than half a dozen guys really gave their best to put this thing to work.
I imagine they have invested several hundred hours on this with no gain on sight, just that nice feeling of self accomplishment.
To them I would like to leave here my public and deepest appreciation and a ' warm handshake '

Augusto Duro

Hi there,
I'm new in this forum and I also want to leave my appreciation to the guys that made this wonderful work.
I'm writing beacause I use everyday the original ICD2 in my work and I use it to program and debug dspic 30F and pic24.
Last week I brought an ICD2 clone on Ebay China and like elec_gu it doesn't work with DSPIC 30F and PIC24 with 3,3v supply voltage.
I think the solution is that ad_tech said: it is necessary to use the AHC buffers.
My original ICD2 mount them, so, since I'have not 74AHC125 in my office now, i unmounted the buffers (125 and 126) from my ICD2 clone and i shorted pins 2,3;5,6;8,9;11,12 of hc125.
In this way the clone works perfectly also with dspic30F and PIC24 with 3,3v supply.
I will try to use 74AHC125 and 74AHC126 and I will let You know if it will work well.
Thanks to ad_tech for the help.:D
 

To ad_tech, potyo and paperbat1,
Hello again.
Good news from here.
Last weekend y took a 'bitscope' from work and used it to see what was happening with my icd2 clone. From now on, I'm going to reference Microchip DS39768b "PIC24FJXXXGA0XX Flash Programming Specification (thanks ad_tech). It took me some time but those are my findings:
- When trying to program a PIC24FJxx device, I saw that the ICD2 clone wasn't generating the "32-bit key sequence" into ISP-PGD pin during the "Entering ICSP Mode" phase (point 3.3, page 13 from reference document). I checked that 4066 chip I/O pins were receiving that data, but 4066 enable pins were LOW.
- I checked that 4066 enable pins were tied to ISP-MCLR thru a diode + 4.7K resistor. From my view, this is wrong and makes this device unable to program PIC24FJXXX devices.
- In order to fix it, I broke this link and wired 4066 chip enable pins to VPP (from MC34063) using similar diode + resistor interface. As a mater of fact, I implemented a jumper allowing me to select between VPP or ISP-MCLR wiring. This is like a "poor man" version of potyo's board X5 jumper. Thanks to potyo.
Now my ICD2 clone is working OK.

To ad_tech and paperbat1
From my tracing, potyo was right. 16F877 minimun period in data/clock generation was about 1uS. I think at 3.3V 74HC devices don't have any troubles handling it.

To potyo
Your comment about programming PIC16LFx at low voltage caused me to dig into my problem when I was going to "throw the towel" in boxing speaking.
Thanks
 

Thanks for good news.

That trick with 4066 is suitable only for 8bit controllers, and only for programming these chips. For 16bit controllers and debugging 8bit controllers it must be always on.
 

HI, first: Many thanks to all people with tried/maked/tested and supported this forum,
I think that it's the only with 49 pages that I have read completely (and I'm not english), but due to that I still have some questions. (como se escribe dudas?)

After reading all posts (forward and backwards ;), I think that I have choose the pics rev b modified by alunaro for making. (excuse my english, I'm spanish)

Correct me if I'm wrong:

Pics revB: work only for 5v devices.
Potyo 2: work with 5v and 3.3v devices.
Pics revB + adapter(5v-3.3v) posted in page 47 by Picnoobie: work with 5v and 3.3v devices.

But I have some questions:

1) For alunaro:Have you tested the 5v to 3.3v adaptor posted by picnoobie in pag 47, with your board? Worked?. Work with LF (or was LV) devices?

2) Pics revB+adapter 5v-3.3 support the same devices as Potyo 2?

3) What is more stable? (pics rev.b (mod) or potyo2)

Thanks. And excuse if this was answered before (I think that no) but I am reading this thread for about 7 hours till now, and now I only see dancing letters all arround ;)
BTW: I think that it could be more easy to find something if the boards/sch/FW was on another thread (and only for that), and keep this for questions, comments, etc.etc. or like other forums, in the first page the boards/sch/fw up to date, and the rest with questions.
Anyway and anyhow many thanks to all of you for making this clone possible, and for give support to other ppl. a big THANKS.
PD: I forgot the www.icd2clone.com wiki. forget the BTW, but I see some clever designs (modifications) here that are not in the www.icd2clone.com (MPi, Alunaro, etc...)
 

elec_gu said:
To ad_tech, potyo and paperbat1,
Hello again.
Good news from here.

To: elec_gu

I'm happy to hear about the good news.
Your sad story does have a happy ending after all.

Thanks for the uS info.
Take care
Augusto Duro
 

he functions of the CY could be determined by a combination of:
-studying the CY firmware
-studying the BL or dexxxxxx.hex files
-studying the win driver
-analyzing the USB traffic
-LA on the ICD CPU interface
 

Hi all,

I build some parts of potyo icd2, but we have de asm codes?

To Potyo: I saw that you used a 12F683 to change digital potenciometer and other component. Do you have de asm/C code for this uC?

Thz for all....

Regrats....
 

I have build the pics (rev b) clone.
It works fine with pic18f-devices (programming and debugging). But with dspic30f (dsPIC30F4013,dsPIC30F6012A) I receive the
ICDWarn0020: Invalid target device id (expected =0x... ,read=0x0)". Firmware upload for dsPic30 looks ok, Selftest was also OK. Target-Voltage is 5V.
ProgICD2 produce the self error.

If I use the Sprut-programmer, i can read the id and programm the device correct.

Any suggestions ??
 

Can anyone plz upload the PIC18F4550 bootloader for ICD2 with LVP bit enable in code. I'm not able to program the PIC18F4550 with the LVISP programmer as given on h**p://www.members.aon.at/electronics/pic/picpgm/.

Thanks in advance.
Nandu
 

plz upload the PIC18F4550 bootloader for ICD2 with LVP bit enable in code.

I'm not able to program the PIC18F4550 with the LVISP programmer as given on h**p://www.members.aon.at/electronics/pic/picpgm/.

This is urgent for me.

Thanks in advance.
Nandu
 

hi,
i'm doing the potyo2 icd2 on a protoboard. when i connect it, it shows that can't recognize the usb device. is it the firmware problem?because i'm burning them using jdm programmer.or connection problem?how could i check?thx
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top