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

your picture from Microchip data is correct for both ends.

If you wish to have a Microchip Standard connector so that your ICD2 connects to all Mchip modules, demos, programmers etc. then both ends of the connector are identical.

RJ12 <==> RJ12 pin for pin (1=1,2=2,......6=6)

so that:

ICD2 Target
1 Vpp 1
2 Vcc 2
3 Gnd 3
4 PGD 4 RB6
5 PGC 5 RB7
6 PGM 6 RB3 not normally used

I have an ICD2-USB clone and it works well with demo boards etc.
I have made a special lead from RJ12 to SIL fro ICSP and specials with:

RJ12 SIL
1 1
2 2
....
..
6 6

This works fine as well.

regards Polymath
 

I'm looking at my RJ-12 socket and it's flipped, contacts are at the bottom, not on top like in this picture
 

polymath:

I see that you mentioned straight cable in your post,
but based on the ICD2 datasheet Microchip's cable is reversed,
so ICD2 side must have a "MIRROR" pinout

Am I correct?

szlovak:
Your link matches exactly what I said in my post, see picture below

It does not matted contacts on the top on on the bottom, pin 1 is pin 1...
 

ok... now I'm getting always
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

and I'm not getting anymore the connect/disconnect sound while in MPLAB, (only when I really connect the device).

Could anyone please help me?

Sincerely,
Alex
 

Hi All

Forget how it looks!

RJ12 to RJ12
Wire Pin1 to Pin1, Pin2 to Pin2........

For those who go by looks!!! If you lay the ribbon cable out flat and straight.
One Plug will have it's latch on top and the other Plug, it's latch underneath.

All of my RJ12 PCB Sockets have the latch nearest the board with connectors uppermost.

I do not recall seeing any type RJ12 PCB sockets with the latch away from the board but it should make no difference if you go by the pin numbers!!! The PCB layout will of course be different.

If someone has designed their hardware mirror image for RJ12 on the PCB then this will be Non-Standard and will only lead to problems over time I am sure.

regards Polymath
 

chupos said:
ok... now I'm getting always
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

and I'm not getting anymore the connect/disconnect sound while in MPLAB, (only when I really connect the device).

Could anyone please help me?

Sincerely,
Alex

what pcb? withaout pull-up for 18f4550 ?
 

no PCB at all, it's mounted on a breadboard, and without external pull-up, the internal pull-up is working perfectly fine, if it wasn't, windows wouldn't detect the device correctly.

PS: I'm using a 20MHz xtal also for the 18F4550, maybe that's a problem and it should be 24MHz? But then I wouldn't understand that it actually is identified ok by win.
 

chupos:
Add pull up resisitors to MCLR, RA3, RB7 and pulldown resistor to RA6
Make sure you have 0.470uF capacitor on VUSB (1uf max)

If you have 20MHz resonator - make sure conf bits set correcly
I have 20MHZ in all my designs

Added after 9 minutes:

polymath

Are you using real Microchip cable or you made one?

Below is a schematics from Microchip manual

It shows cable is not straight through:

1-6
2-5
3-4
4-3
5-2
6-1

I am still not sure...
 

Andy_123 said:
chupos:
Add pull up resisitors to MCLR, RA3, RB7 and pulldown resistor to RA6
Make sure you have 0.470uF capacitor on VUSB (1uf max)

If you have 20MHz resonator - make sure conf bits set correcly
I have 20MHZ in all my designs

thanks for your answer andy :)

added the pull-up and pull-down resistors and changed the 10uF to a 1uF capacitor on Vusb, but still no luck.
My FOSC,CLKDIV config value is: 0000 1111 0010 0100. Is that correct? I'm kinda lost with the value table of the datasheet :/
 

Reg 300000=&H24
Reg 300001=&H0F

So your bits look OK

Check "code protect boot"=disabled (300009=&HC0)

Technocally all code regs should be disabled
 

thanks again for your reply, but 300009 is already 1100 0000 :(

my config bits:
**broken link removed**
 

Andy_123
Yes you are right, however:

I have just reviewed over 8 different clone schematics AND
Mchip ICD2-USB/RS232 Orginal reverse engineered schematic.

THEY ALL SHOW their output as
1==Vpp, 2==Vdd, 3==GND, 4==RB7, 5==RB6, 6==RB3

the ONLY data for lead is from 51331B.PDF which I agree does show 1-6,2-5 etc.

I appear to have a built non-standard output on my clone as has everyone else.
My target RJ12 plug is the same as Mchip - correct - and it works with demo boards and headers.

Make sure your target connector plug is:

1==Vpp, 2==Vdd, 3==GND, 4==RB7, 5==RB6, 6==RB3

Polymath
 

i have seen many real microchip icd2s and i can confirm that the RJ12 leads are indeed crossed. If you are building kit for your own use and never swap stuff with others who use real ICD2s it really doesn't matter but if you do then you will have to keep carefull track of which leads go with with the real ICD2 and which with the clones.
 

Polymath

I agree with you - all clone designs including mine ;) have INCORRECT RJ12 pinout that WILL NOT work with cable from MICROCHIP!

Do we have to change it? I am not sure now...

Clone is clone and who cares, it does not have to match the original and stupid cross over cable!

In my design I am using RJ45 with Cat5 cables and all CAT5s are straignt through - easy to make, easy to find.
 

k, replaced my 18F4550, and now I'm getting

Connecting to MPLAB ICD 2
...Connected
ICD0082: Failed MPLAB ICD 2 operation
MPLAB ICD 2 Ready


seems as if MPLAB doesn't like me :(
anyone could please help me?


---
after replacing the 16F877A, now it stays forever at
Connecting to MPLAB ICD 2
...Connected

saying in the status bar: Connecting


---
"great"... now it stopped working just after disconnecting and connecting it again, now it's back to
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

I don't know what to do :'(


sincerely,
alex
 

About Vpp generator!
I built my old ICD2 like www.5v.ru MICD2 vpp generaor and add potentiometer to fne tune Vpp

Thanks for nice new USB schemaic, but where i can get firmwares for 18F4550 and 16F877

Best regards Ritvars
h**p://engineer.kicks-ass.org/ritvars
 

ritvarsrizikovs said:
Thanks for nice new USB schemaic, but where i can get firmwares for 18F4550 and 16F877
Read the entire topic, and you will find the firmware's.
 

Andy_123

It really does not matter what pinning you use but to be compatible with PIC headers and demo boards then:

Make sure your TARGET connector is RJ12 Plug and:

1==Vpp, 2==Vdd, 3==GND, 4==RB7, 5==RB6, 6==RB3



the rest of the design - like all clones - is up to you
- but why reinvent the wheel - square ones don't roll!

Re: CAT5e - Be warned - not all CAT5e patch cables are the same - Crossover CAT5e for PC/PC direct are not pin-pin and they are usually coloured Red.
see: https://www.lanshack.com/make-cat5E.aspx


best regards Polymath
 

k, replaced my 18F4550, and now I'm getting

Connecting to MPLAB ICD 2
...Connected
ICD0082: Failed MPLAB ICD 2 operation
MPLAB ICD 2 Ready

Normally you are getting this message if 877A has no firmware, just a bootloader.
Select download OS from menu bar.

Polymath:
I know about crossover CAT5s - they are part of my dayjob - but I am making CAT5 leads myself and they all straight through.
But thanks for warning to other guys.
 

Just wondering, why the original design for Target MCLR/VPP using DG411 was abandon while ago?
It is very simple and required only one widely available chip DG411 vs
4 transistors+ resistors + diods or OP Amp version.

Any ideas?
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top