| Author |
Message |
newbyte
Joined: 30 Aug 2007 Posts: 4 Location: España
|
30 Aug 2007 0:52 Re: Project to replace CY7C64613 in the ICD2 |
|
|
|
|
| alunaro wrote: |
I have tested my circuit in debug mode (tested with 16f877a target)
It works perfectly with MPLAB 7.6, debugging without problems.
I attach the source that i wrote (it is not nice, only for testing purporses). It has
notes about ICD2 debug mode and how to set it. Anyway, you can read the code  |
I have tested my circuit in debug mode (tested with 16f877a target)
i have this problem: ICD0083: Debug: Unable to enter debug mode
can you help me?
|
|
| Back to top |
|
 |
blueroomelectronics
Joined: 17 Sep 2006 Posts: 1302 Helped: 65 Location: Toronto, Canada
|
30 Aug 2007 2:03 Project to replace CY7C64613 in the ICD2 |
|
|
|
|
| Does your 16F887A have the oscillator configured correctly? You must have a running clock to use the debugger.
|
|
| Back to top |
|
 |
alunaro
Joined: 15 Jan 2002 Posts: 87 Location: Another world
|
30 Aug 2007 14:51 Re: Project to replace CY7C64613 in the ICD2 |
|
|
|
|
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.
|
|
| Back to top |
|
 |
newbyte
Joined: 30 Aug 2007 Posts: 4 Location: España
|
30 Aug 2007 15:41 Re: Project to replace CY7C64613 in the ICD2 |
|
|
|
|
| blueroomelectronics wrote: |
| 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 wrote: |
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
|
|
| Back to top |
|
 |
alunaro
Joined: 15 Jan 2002 Posts: 87 Location: Another world
|
30 Aug 2007 22:06 Re: Project to replace CY7C64613 in the ICD2 |
|
|
|
|
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: http://forum.microchip.com/tm.aspx?m=141274
*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.
|
|
| Back to top |
|
 |
newbyte
Joined: 30 Aug 2007 Posts: 4 Location: España
|
31 Aug 2007 4:18 Re: Project to replace CY7C64613 in the ICD2 |
|
|
|
|
| alunaro wrote: |
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?
|
|
| Back to top |
|
 |
yahootew3000
Joined: 20 Aug 2007 Posts: 26
|
31 Aug 2007 12:08 Project to replace CY7C64613 in the ICD2 |
|
|
|
|
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
|
|
| Back to top |
|
 |
blueroomelectronics
Joined: 17 Sep 2006 Posts: 1302 Helped: 65 Location: Toronto, Canada
|
01 Sep 2007 6:24 Project to replace CY7C64613 in the ICD2 |
|
|
|
|
| Make sure the oscillator is set to HS
|
|
| Back to top |
|
 |
newbyte
Joined: 30 Aug 2007 Posts: 4 Location: España
|
01 Sep 2007 21:04 Re: Project to replace CY7C64613 in the ICD2 |
|
|
|
|
| blueroomelectronics wrote: |
| 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!
|
|
| Back to top |
|
 |
paperbat1
Joined: 06 Jun 2006 Posts: 1
|
03 Sep 2007 8:58 Re: Project to replace CY7C64613 in the ICD2 |
|
|
|
|
| ad_tech wrote: |
| elec_gu wrote: |
To ad_tech:
First of all. Thank you for your answer.
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  |
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.
|
|
| Back to top |
|
 |
elec_gu
Joined: 30 Jul 2001 Posts: 25 Helped: 1
|
03 Sep 2007 16:45 Re: Project to replace CY7C64613 in the ICD2 |
|
|
|
|
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
|
|
| Back to top |
|
 |
potyo
Joined: 16 Apr 2006 Posts: 180 Helped: 10 Location: Ada, Vajdaság
|
03 Sep 2007 17:11 Project to replace CY7C64613 in the ICD2 |
|
|
|
|
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.
|
|
| Back to top |
|
 |
pafh
Joined: 01 Sep 2007 Posts: 3
|
03 Sep 2007 21:49 Re: Project to replace CY7C64613 in the ICD2 |
|
|
|
|
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...)
Last edited by pafh on 04 Sep 2007 11:30; edited 1 time in total |
|
| Back to top |
|
 |
ad_tech
Joined: 08 Aug 2007 Posts: 5 Helped: 2 Location: Portugal - Estoril
|
04 Sep 2007 1:57 Re: Project to replace CY7C64613 in the ICD2 |
|
|
|
|
| elec_gu wrote: |
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
|
|
| Back to top |
|
 |
venky442
Joined: 28 Jun 2007 Posts: 12 Helped: 2
|
04 Sep 2007 3:06 Project to replace CY7C64613 in the ICD2 |
|
|
|
|
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
|
|
| Back to top |
|
 |
shadowfox
Joined: 18 Apr 2007 Posts: 3
|
04 Sep 2007 19:00 Re: Project to replace CY7C64613 in the ICD2 |
|
|
|
|
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....
|
|
| Back to top |
|
 |
potyo
Joined: 16 Apr 2006 Posts: 180 Helped: 10 Location: Ada, Vajdaság
|
04 Sep 2007 20:54 Project to replace CY7C64613 in the ICD2 |
|
|
|
|
| That idea with 12F683 was not too good. Don't make that board.
|
|
| Back to top |
|
 |
km75
Joined: 21 Aug 2007 Posts: 2
|
04 Sep 2007 22:41 Project to replace CY7C64613 in the ICD2 |
|
|
|
|
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 ??
|
|
| Back to top |
|
 |
Nandulal
Joined: 23 Feb 2006 Posts: 90 Helped: 1
|
05 Sep 2007 11:58 Re: Project to replace CY7C64613 in the ICD2 |
|
|
|
|
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
|
|
| Back to top |
|
 |
Nandulal
Joined: 23 Feb 2006 Posts: 90 Helped: 1
|
06 Sep 2007 9:38 Re: Project to replace CY7C64613 in the ICD2 |
|
|
|
|
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
|
|
| Back to top |
|
 |
yahootew3000
Joined: 20 Aug 2007 Posts: 26
|
07 Sep 2007 13:56 Project to replace CY7C64613 in the ICD2 |
|
|
|
|
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
|
|
| Back to top |
|
 |
potyo
Joined: 16 Apr 2006 Posts: 180 Helped: 10 Location: Ada, Vajdaság
|
07 Sep 2007 14:02 Re: Project to replace CY7C64613 in the ICD2 |
|
|
|
|
| Nandulal wrote: |
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 |
Import in MPLAB, then go to Configuration bits, uncheck checkbox, set LVP to enabled, and then save the hex file with Export
Added after 47 seconds:
| yahootew3000 wrote: |
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
 |
Do you have capacitor on the Vusb pin
|
|
| Back to top |
|
 |
yahootew3000
Joined: 20 Aug 2007 Posts: 26
|
07 Sep 2007 19:53 Re: Project to replace CY7C64613 in the ICD2 |
|
|
|
|
| potyo wrote: |
Do you have capacitor on the Vusb pin  |
yes...i already put 330nF on it...is the schematic on this page http://www.icd2clone.com/wiki/Main_Page all correct?i mean the potyo2 schematic...the firmware for potyo2 is the one named Firmwares?
by the way, i am trying it on my laptop..i want to use laptop to do the pic stuff,so, decided to build this ICD2 clone..is it support notebook?thx
|
|
| Back to top |
|
 |
Jose Fausto
Joined: 27 Jun 2005 Posts: 71 Helped: 1 Location: Peru
|
09 Sep 2007 21:52 Re: Project to replace CY7C64613 in the ICD2 |
|
|
|
|
Hi folks
Thank You for this great job.....
I have do the project in protoboard and it is ok, of course I had comite some mistakes, but now it is working, I will test with more PICs,...like DSPIC30F6014, but I donot have a program for test it, somebody can helpme with any small program.......
Best regards
JoseF
|
|
| Back to top |
|
 |
Jose Fausto
Joined: 27 Jun 2005 Posts: 71 Helped: 1 Location: Peru
|
10 Sep 2007 23:50 Re: Project to replace CY7C64613 in the ICD2 |
|
|
|
|
Again friends
I tested the ICD2 with target device PIC16LF874 and it works ok with Voltage at target at 2 volts, but have to use 74AHC devices at the level coverter, because the voltage levels for logic are diferent for series 74HC and 74AHCT.....
SEE YOU FRIENDS
Greetings from Peru, and sorry for my poor english
|
|
| Back to top |
|
 |
yahootew3000
Joined: 20 Aug 2007 Posts: 26
|
11 Sep 2007 14:01 Re: Project to replace CY7C64613 in the ICD2 |
|
|
|
|
| yahootew3000 wrote: |
| potyo wrote: |
Do you have capacitor on the Vusb pin  |
yes...i already put 330nF on it...is the schematic on this page http://www.icd2clone.com/wiki/Main_Page all correct?i mean the potyo2 schematic...the firmware for potyo2 is the one named Firmwares?
by the way, i am trying it on my laptop..i want to use laptop to do the pic stuff,so, decided to build this ICD2 clone..is it support notebook?thx |
i think it is the Vdd have not enough supply..after i put a 0.33uF for Vdd,the device is detected.
|
|
| Back to top |
|
 |
Jose Fausto
Joined: 27 Jun 2005 Posts: 71 Helped: 1 Location: Peru
|
11 Sep 2007 15:10 Re: Project to replace CY7C64613 in the ICD2 |
|
|
|
|
The value for capacitor for Vusb must be 330nF, I am doing in SMD, and canot find this value, may I can put in parallel, or some body experiment any problem....
In this moment I am using 220nf and it works OK, but I want to be suro .....
thank You
|
|
| Back to top |
|
 |
CMOS
Joined: 06 Jan 2004 Posts: 679 Helped: 28
|
11 Sep 2007 16:08 Re: Project to replace CY7C64613 in the ICD2 |
|
|
|
|
| Jose Fausto wrote: |
The value for capacitor for Vusb must be 330nF, I am doing in SMD, and canot find this value, may I can put in parallel, or some body experiment any problem....
In this moment I am using 220nf and it works OK, but I want to be suro .....
thank You |
I tried parallel combination of 270nF and 33nF. It works without problem.
|
|
| Back to top |
|
 |
potyo
Joined: 16 Apr 2006 Posts: 180 Helped: 10 Location: Ada, Vajdaság
|
11 Sep 2007 21:27 Re: Project to replace CY7C64613 in the ICD2 |
|
|
|
|
| Datasheet says 220nF±20%. Remember, it is to filter the USB hardware's power, it isn't a part of an oscillator.
|
|
| Back to top |
|
 |
Jose Fausto
Joined: 27 Jun 2005 Posts: 71 Helped: 1 Location: Peru
|
12 Sep 2007 13:06 Re: Project to replace CY7C64613 in the ICD2 |
|
|
|
|
HI FRIENDS
I see some ICD2 circuit using power from USB for supply the target circuit, and some other donot use the USB power, only use external power......
how is the original ICD2?.....AND
What is the maximun current what a USB port can suply?
Thank You
|
|
| Back to top |
|
 |