[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:


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

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!
 


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.
 

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....
 

That idea with 12F683 was not too good. Don't make that board.
 

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.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…