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.
hi Andy_123
DG411 chip is not so "widely available" in my country in small qty. i don't like transistor replacement but it seems to be easy solution. Using opamp is great idea but you have to tweak ICD2_VPP voltage measurement in this case becouse it is not easy to find >16V rail-to-rail opamp.

i'm searching for best DG411 replacement ...

best regards
stroma
 

DG411 is available from maxim, so you can easily get them as samples.

back to my problems, I've really no clue of why I'm getting all the time
Connecting to MPLAB ICD 2
ICD0289: Unable to re-program ICD2 USB OS firmware.
ICD0021: Unable to connect with MPLAB ICD 2
MPLAB ICD 2 Ready

Got a pull-up resistor on MCLR, RB7 (PGD) and RA1, got a pull-down resistor on RA4, a 1uF capacitor between Vusb and GND (tried also with less and more capacitance),
a 20 MHz xtal with two 22pF ceramic capacitors tied to GND,... and I really have no clue of whats going on.

any help is much appreciated.

sincerely,
Alex
 

DG411 available not just from MAXIM,
Intersil, Analog Devices, Vishay, Silliconix make cheap DG411 clone as well.

And it is available as a sample...
 

Guys, don't you think that T6 in is too weak for 500mA load? I think I'll use BC327 or similar? Besides L2 and R3 are so huge. Programming current is only a few mA.
 

Programming current is MORE than a few milliamps for the
16CXXX series of µC.

I hear you all cry 'we are only using Flash devices' but remember
MChip will have to accomodate as much of their range as possible with their
Universal Programming Module for the ICD2.

Have just programmed 4550 on demo board,
piggybacked a boot programmed 877A with some bent legs!
a reset fet and it works fine!
After USB connection had to manually instruct downloading of ICD2 OS to 877A in MPLAB

As my demo board has a separate supply, I found that USB enumeration was unstable - sometimes Win98SE connected to UNKNOWN device.
If I held the 4550 in Reset whilst plugging-in the USB lead then released the reset
enumeration was 100%.

with reference to:
https://ww1.microchip.com/downloads/en/DeviceDoc/ICD2_Advisory_51566b.pdf
PROPER USB CONNECTION TO AVOID LATCH-UP
Always connect a powered USB cable to the MPLAB ICD 2 first before
connecting any other power source, either directly to the ICD pod or indi-
rectly through a connection to the target board. Also, when powering
down, make sure the USB cable maintains power until all other power
sources are removed, i.e., do not power down the PC first and then the
ICD pod and/or target board.
If MPLAB ICD 2 loses USB power while other sources continue to deliver
power to the ICD pod, the MPLAB ICD 2 can lock up and may require a
complete system (MPLAB ICD 2 and target board) power down and then
power up to make the ICD functional again. Some older pods may suffer
permanent damage.
If you have followed these instructions but still have latch-up problems,
please see “MPLAB ICD 2 Unit Upgrade”.

see Release Notes usually in
C:\Program Files\Microchip\MPLAB IDE\Readmes\........
Release Notes for MPLAB® ICD 2 In-Circuit Debugger
MPLAB® IDE v7.40
MPLAB ICD 2 DLL v7.31.7.4

hope this may help Polymath
 

Hi, first I would like to say thanks to all the people who have contributed to this thread. I have been keeping track of this project for quite some time and have been thinking of ways to try to get this circuit as simple as possible. In reference to an earlier post, what do you guys think of using a MAX633 (5->15v 225mW) for deriving VPP? It only uses two external components (an inductor and capacitor) and a resistor and trimmer could be added to adjust the vpp voltage. Does it provide sufficient power? Or is the MAX641 a better solution?
 

Hello together

I made a ICD2 clone according to the schematics in this thread.

After mounting all the parts I programmed the PIC16F877 and PIC18F4550 with the firmware and installed the Micrchip USB driver.
My hardware has
PIC18F4550:
RB6 and RB7 of PIC18F4550 have 10K pull-up resistors, also MCLR
Capacity for RC3 470nF
Oscillator 20MHz, 27pF

PIC16F877-20I/P0:
MCLR with Transistor, it seems that ist works as if I try to connect the ICD2 inside MPLAB, MCLR of will fall to 0V
Oscillator 20MHz, 27pF

If I try to download the Operating system I get the message:
Downloading Operating System
ICD0021: Unable to connect with MPLAB ICD 2
...Download Operating System Failed
ICD0029: Invalid MPLAB ICD 2 module product ID (0)
ICD0082: Failed MPLAB ICD 2 operation
ICD0082: Failed MPLAB ICD 2 operation
ICD0082: Failed MPLAB ICD 2 operation
ICD0082: Failed MPLAB ICD 2 operation
MPLAB ICD 2 Ready


If I start MPLAB set up USB and try to connect I get the message:

ICD0021: Unable to connect with MPLAB ICD 2
MPLAB ICD 2 Ready

I also have a led with a 1K5 resisitor on RC1 of the PIC18F4550 but it does not light up.

For any help, I would be very happy

Best regards
Geri
 

Hi,

thanks for everyone who contributed to this project. I have the controllers here now and will be able to borrow a ICD2 next week, but not for long so I need to get this right at the first try. Coming from Atmel I'm not used to the configuration bits so please tell me if those are right:

For the 877A:
Oscillator: XT
Watchdog: On
PowerUp Timer Off
Brown Out Detect On
Low Voltage Program Disabled
Flash Write Protection: Off
EE Read Protect: Off
Code Protect: Off

For the 4550 (20MHz crystal):
According to a post on page 6:
24
clk src from 96mhz pll/2
osc1/osc2 src/1 - 96mhz pll /2
divide by 5

0F
hs: hs+pll, usb-hs
failsave disabled
int ext switch mode disabled

can't get the right values for the next few, I guess all the write protections must be disabled but how about the rest?
 

Every firmware contains the right config bits, don't care about it. If you want to view they, first go to Configure-->Select Device(4550 or 877), open the files with File-->Import, and then go to Configure-->Configuration Bits.
 

Hi,

when I open the hex in MPLAB and then the config bits window I get completely wrong bits. Does that mean I can ignore them and just write the hex files? Great I'll do that tomorrow, thanks.
 

First select the right device, and after that import the files.
 

Geri
you said
installed the Microsoft USB driver.
did you mean Microchip?
ICD2 will NOT work with Microsoft USB driver
it will ONLY work with Microchip ICD2 Driver

Polymath
 

mplab still doesn't show the right values in the config window (I'm using the files which Pics has posted), but I'll try it and hope it works out right.
 

Hello polymath

Thank you very much for your hint. Yes I installed the Microchip-driver, sorry for the wrong information.

Is it a problem if I do not use the PIC16f877A? Do I need another bootloader file?

Best regards
Geri
 

If you use 16F877, then you can find the bootloader in MPLAB IDE\ICD2 folder, it is called BL010101.hex
 

Hello potyo

Thank you for your fast response. I will try it and inform you if it works. Thank you very much for your fast response!!!
Geri

Added after 1 hours 1 minutes:

Hello

I changed the bootloader file to BL010101.hex but I still get the error message:
ICD0021: Unable to connect with MPLAB ICD 2
MPLAB ICD 2 Ready

As bootloader file for the PIC18F4550I/PT is used 18F4550_boot.hex


Does anybody have another ideas how to solve this problem?

Best regards
Geri
 

Well I made some modifications to the design, but I haven't been able to test it out yet since I don't have all the parts. Basically I went over the past schematics, and studied the old RS232->USB design of lothar stolz and arrived at the following schematic. I was able to eliminate most of the transistors with the ICL7621 opamp, except one, which is tied to RST and MCLR (If anyone has any ideas on how to eliminate this transistor let me know). And then I chose the MAX633 for a 5-15V conversion to derive VPP. I'm not if the MAX633 meets the minimum current requirement for programming some pics, but it can easily be replaced by a higher power converter if needed. Well here it is, if any of you spot any flaws, or places where I can improve this please let me know! Thanks!

Revising Design
 

I managed to program the controllers today, with the right config bits. What I had to do was using the File->Import menu instead of File->Open in MPLAB.

Your schematic looks nice, would you mind posting the eagle schematics file?
 

acrobat said:
Your schematic looks nice, would you mind posting the eagle schematics file?

Sure thing! Here it is, if you do make any modifications or find any errors please let me know so I can make the necessary changes for everyone. Thanks!

"Revising Schematic"
 

acrobat said:
I managed to program the controllers today, with the right config bits. What I had to do was using the File->Import menu instead of File->Open in MPLAB.

Your schematic looks nice, would you mind posting the eagle schematics file?

If you had read this thread you would know the difference between Open and Import and saved yourself much time.

azn_oohwee
don't believe acrobat

check function of 4550 Vusb --read thread again
which chip are you using MAX631CPA or MAX633?
RA3 should sample module Vpp - wrong source, wrong values - read thead again
R4 may need changing - read thread again

this may help - it is in thread
**broken link removed**

this is new - obviously found the need to buffer outputs as Microchip have
**broken link removed**

good luck you may need it Polymath
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top