[SOLVED] Project to replace CY7C64613 in the ICD2

Status
Not open for further replies.
Hello Gonza

I wish you success.

JQ_Lin
 


blueroomelectronics said:
I came across this in another thread, not sure if it'll work but it looks interesting.

picnoobie said:
Yes, That's the one I built.

That's a good idea of level conversion.
Simple and ingenious!
After analysis, I affirm that, it'll work very well.
I'm glad to saw that.

JQL
 

goooooooooood newsss!!

I finished my potyo ICD2 and it worksss!!!

It passed the self test but I didn't test it with any pic. Later I'll do it.

Code:
Connecting to MPLAB ICD 2
...Connected
Setting Vdd source to MPLAB ICD 2
ICDWarn0020: Invalid target device id (expected=0x21, read=0x0)
...Reading ICD Product ID
Running ICD Self Test
...Passed
MPLAB ICD 2 Ready

I think the "ICDWarn0020: Invalid target device id (expected=0x21, read=0x0)" warning is because I don't have any device connected to the ICD2.

Well, my problem is that the VDD led is always ON. When I check "power from ICD2" it goes brighter and when I uncheck that option I goes less brigh but it keeps ON. Does anyone why is that? I used 3mm leds. Maybe I should try with 5 mm?

I'm very happy, I hope that everything goes right now... THANK YOU SOOOO MUCH POTYO !!

.............................................

Here are some screenshots of what I'm explaining.....When VDD is disabled and nothing is connected to ICD2 (no target board) the VDD is 2.5V...is this normal?

VDD FROM ICD2:
**broken link removed**

VDD NOT FROM ICD2:
**broken link removed**

Thanks.
p.d: it worked with latest version of MPLAB IDE
 

Well, my problem is that the VDD led is always ON. When I check "power from ICD2" it goes brighter and when I uncheck that option I goes less brigh but it keeps ON. Does anyone why is that? I used 3mm leds. Maybe I should try with 5 mm?

Hi
This is because you miss put a diode (1n4148) in the hc126 power to prevent the reverse current introduced by hc126 input signals.
Regards
 



I can confirm you that my scheme works. It's exactly the same than original PICS one, but in eagle format (and some component moved due to i use wider tracks).

1. You don't need to change any option win winpic. Only load the hex file.
Try the .hex modified with MCLR EN disabled (search in this thread)

2. Attach ICD2 to PCA, open MPLAB and DO NOT USE "CONNECT ICD2".
Select programmer, select download OS.. THEN.. connect
I do the same than you and icd2 didn't work, therefore in my case 18F4550 got corrupted because couldn't connect and (or at least looked so).

I have at home the exact secuence of steps to follow. I repeated them (also reprogramming pics), and worked perfect all times, with all MPLAB versions I installed (7.40, 7.60). When arrive at home and if i remember it , i'll post it.

I tested only programming not debugging. No problem at all: programming, erasing, reading.. all perfect.
 

Gonzakpo said:
When VDD is disabled and nothing is connected to ICD2 (no target board) the VDD is 2.5V...is this normal?
Hi

It doesn't make any problem, only that led lights slightly.
 


mmm, I didn't undestand you. I miss TO put? ..or I miss put? ...

I rechecked the potyos schematic and it doesn't have any diode in the hc126 power....What should I do ?

Hi

 

Gonzakpo said:
But is this normal? or should I try to fix that?...
This is normal. You don't need to fix anything, except if this light makes problem for YOU. For your circuit it makes no problem.

The reason is: when one of the signals on the left of the level translators is high, there is a small current (approx. 1mA) through protection diodes on the input pins of the level translators to its power rail (ISP-VDD). If there is nothing connected on the target side, this current flows through the led, and the led lights.
 

ahhhhhhhhhhhhhhhhhhhhhh now I understand what folks said about the reverse current! Thank you so much.

I'll try with a target device, if everything goes fine I'll let you know. Do you think I should add a 1n4148 between ISP-VDD and HC126 power? Could it work?

Thanks.
 


Hi
I´m very sure, works fine with 3.3V and 5V. I have two potoyos (version 2), one TQFP and one DIP, both have a Diode, both works fine with DSPIC33

Sorry for do not understand my previus post but my english is poor.
Regards
 

Ok, I'll try it later. Before I want to make sure that everything is working fine.

For instance, I'm having a problem. I'm trying to program a 16F84A (not debug), and ICD2 doen't recognize the target device:

Code:
ICDWarn0052: MPLAB ICD 2 cannot validate a target device. Please make sure that the target device is connected and properly powered. Select "OK" to continue, or "CANCEL" to abort the operation

I measured the voltages in the target device and they are ok I think. What I'm not sure is about these voltages, they seem kind of LOW compared to everyone else's ICD2.

**broken link removed**

Anyway, my ICD2 passes the self test which is strange. The ICD2 user manual says the following: "A voltage level on pin 1 (VPP) of 7-8 volts is too low".

Well, I need some help please. I'm sorry to be sooo persistent.
 

First of all check the voltage using multimeter on 18F877's RA3 pin (5th), and on the VPP-GEN rail.
 

Ok. Here I am again. RA3 = 2.4V - VPP-GEN=9.34V

.............................

just a little update, now I'm having these readings:

**broken link removed**


I'm trying to read or program a 16F84A and it doesn't recognize it. Tomorrow I'll recheck my PCB. I hope somebody can help me because I really don't know how this works, I just need it for another project. PGD and PGC when I'm measuring them they seem to be "unconnected" (in spanish: "al aire"), later I-ll check the schematic and track down the problem. Any clues are welcomed.

Regards,
Gonza
 

alunaro said:
I have at home the exact secuence of steps to follow. I repeated them (also reprogramming pics), and worked perfect all times, with all MPLAB versions I installed (7.40, 7.60). When arrive at home and if i remember it , i'll post it.

If you can...please post the sequence

Thanks a lot
 

1. Program 16F877A with firmware in PICs zip. Default settings
Do the same for 18F4550, but use the firmware with MCLR dissabled.

Use the firmwares.zip file attached. I got them from this thread.
Have some snapshot of how settings are. If settings aren't the same, maybe
.hex is corrupted (it happened to me)
DO NO MODIFY ANY OPTION. If some option is wrong, then check files or winpic detect correctly your device.

2. Connect the ICD2 to PC. In this point, it should be enumerated by windows
and request installing drivers (have MPLAB previously installed).

Let it choose drivers. If ask for them... well, I used OEM

3. Run MPLAB

4. Select programmer ICD2

DO NOT CONNECT IN THIS POINT. IT'S VERY IMPORTANT.

5. "Download operating system" option will be enabled. Select it.
It will download the OS.

In this point, MPLAB should report:

Downloading Operating System
Connecting to MPLAB ICD 2
...
Connected

Setting Vdd source to MPLAB ICD 2
...
Reading ICD Product ID

Running ICD Self Test
...
Passed
...
Download Operating System Succeeded
MPLAB ICD 2
Ready

6. Verify all leves are correct if you want:

Programmer->Settings->Status-> All tests passed
Programmer->Settings->Power (in my computer: )
Target Vdd: 4.96 (5V aprox)
Target Vpp: 13.02 (13V aprox)
MPLAB ICD2 Vpp: 13.02 (13V aprox)

7. NOW YOU CAN CONNECT.

(could download the specific SO for the target)


ICD2 should be full working from this point

I repeated these steps several times and worked perfectly all times.
If have some problem, check your ICD2. Mine worked from the begining without any problem.

Only difference with PICS's are: i used a wire for one inductor and 150uH for other (i couldn't find 100uH)


I hope it will help you.


And yes, i'm a very perfectionist
 

Well, some news. Now it's detecting the target but it doesn't program it or anything. I tried to erase a 18F4550 and when I do the blank-check it fails.

Code:
Connecting to MPLAB ICD 2
...Connected
Setting Vdd source to MPLAB ICD 2
Target Device PIC18F4550 found, revision = a3
...Reading ICD Product ID
Running ICD Self Test
...Passed
MPLAB ICD 2 Ready
Erasing Target Device...
...Erase Succeeded
MPLAB ICD 2 Ready
Blank Checking...
...Program Memory
ICD0161: Verify failed (MemType = Program, Address = 0x48, Expected Val = 0xFFFF, Val Read = 0xFF)
...Device not blank

Probably is because the low voltages... Potyo help me please!! (or anyone else!)
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…