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.

ICD2 USB clone - how to get it to work with 3.3V PIC24s ???

Status
Not open for further replies.
can you damage the icd2

The 5V output signal on PGD and PGC lines is not problem for the 24F and 33F devices, but if you want to debug an 16F or 18F device running at lower voltage, you need level translators. Read my 4th post in this topic, and check my schematic here: The problem is the 5V on the mclr pin of the 24F and 33F devices.
 

icd2 vpp high

Hi potyo

From my recent reading of the PIC24 Family data and device data sheets clearly state:
all pins are 5V tolerant

So 5V on /MCLR should be no problem.
I have asked Mchip Tech Support for more info.

Polymath
 

max3378 converter

Hi
Only to avoid misunderstanding, I've checked now the 24FJ128GA's and dsPIC33F Family's datasheet, and i found these maximums:

Voltage on VDD with respect to VSS........................................................................ -0.3V to +4.0V
Voltage on any combined analog and digital pin and MCLR, with respect to VSS.... -0.3V to (VDD + 0.3V)
Voltage on any digital-only pin with respect to VSS................................................. -0.3V to +6.0V(+5.6V)
Voltage on VDDCORE with respect to VSS............................................................... -0.3V to +3.0V

On these chips the PGC and PGC pins are also analog inputs-->we can't apply 5V on these pins-->we must use the AHC and HCT buffers like the original icd2. But i dont know, what to do with MCLR pin?
 

how to use icd2

Hi potyo

Yes I would like to resolve this matter too.

Have you read the link I posted?
**broken link removed**

Microchip claim NO INPUT DIODES
pin protection is by a different method and above 5V!

Your comment? ........ Polymath
 

icd 2 vpp generator

Yes, i have read it, but according to maximum ratings we can't apply voltages higher than vdd+0.3V to the pins used for programming.
I think, the pin protection is realised similarly to the protection of inputs on AHC logic family. Here is a short description: **broken link removed**

But I've found the key. The original icd2 connects the MCLR pin to the target's vdd, not to the icd2's 5V. So if your target has it's own power supply and runs at lower voltage than 5V, simply disable the powering target board from icd2(for 3.3V devices it is disabled, and you can't enable it), and you will get the right voltages on every pin.
 

icd2 кушнир

Hi potyo
Yes I agree

my research shows:
ICD2 communicates to PIC24 and other devices at 3v3.
Target Power must be from an external supply for 3v3 devices.
The ICD2 can only supply 5V. (my Advanced Transdata PIC-ICD has variable Vdd)
Uncheck the "Power target from ICD2" checkbox in MPLAB.
Connect Debug+Vdd pin to Target +V supply.
ICD2 will sense Target +V supply (RA0).
ICD2 will scale PGC and PGD to the sensed Target +V level (Target+V <buffers> Gnd).


I too have reviewed the ICD2USB original schematic
and the new ICDUSB2.5 (with buffers) at:
**broken link removed**
Will this supply 5v0 (current limited) to a 3v3 device on /MCLRVpp pin (+vhh<opamp>gnd)?


In summary:
Would you agree that?

To use ICD2 USB Clone with PIC 3v3 Devices

The target must be self powered

The buffer/drivers for PGC and PGD connected to the target MUST be powered from the Target +V

AND Target /MCLRVpp line is xor controlled (OC/OD/current limited) thus:

/RC0 switches ... +Vhh (13v5) ... to ... target /MCLR-Vpp
/RC1 switches ... Target +V ... to ... target /MCLR-Vpp
/RC2 switches ... Gnd ... to ... target /MCLR-Vpp



good fun getting here!
regards ... Polymath
 

icd 3.3v 5v adaptor

Hi
I agree with you, with small correction: Targets +V supply is sensed by RA1 pin. RA0 senses voltage on the targets /MCLR pin.
The buffers on the icd-->target direction must be without protection diodes(74AC126 or 74AHC126) and supplyed from the targets +V. In the opposite direction the buffers must have TTL compatible inputs(74HCT125 or 74AHCT125), and are supplyed from icd's power supply.

Small question: what does mean "xor controlled"?
 

hot to connect target device pic24fj

Hi potyo

Yes. you are right, sorry my mistake!

My last posting should read:
ICD2 will sense Target +V supply (RA1). - (RA0 is target /MCLR-Vpp monitor)

Re: Buffers - Good idea!
Using 74AHC125/126 instead of HC devices will - because of their wider input range - remove the need for current limiting resistors on the buffer inputs - which original ICD2 has.


XOR question - should be XNOR?:
Review original ICD2-USB and DG411 as I am sure you know:
Controlling inputs RC0,RC1,RC2 are all normally HI (switches open) and the combined output of DG411 to target /MCLR-Vpp is normally Hi-Z.
Only one control line may be driven low at any time otherwise the DG411 may exceed current capacity - it has no current limiting resistors to ensure response time.
The overall effect of drive to target /MCLR-Vpp with XNOR of RC0,RC1,RC2 - each control represents a different voltage.

DG411 I think is a good solution to driving target /MCLR-Vpp - Hi-Z off, low on, fast enough, fault torerant and robust (±36v).
I used these for basic video switching years ago, they used to be expensive and single source but not any more.
Remember that target /MCLR-Vpp may require Ipp of 50mA for programming PIC16Cxxx family and MChip would, commercially, need to include these in the range.

best regards ... Polymath
 

connect 24f to icd2

I don't see any problem with programming or debugging with this ICD2 (BC547/557 transistors). Only few resistors and it will work.

By the way, 5V for dspic33 and pic24 on MCLR is too much, but why ICD2 doesn't say anything about it ? In datasheet Vih max for MCLR is 3.3V

Added after 53 minutes:

potyo said:
Hi
Only to avoid misunderstanding, I've checked now the 24FJ128GA's and dsPIC33F
...
On these chips the PGC and PGC pins are also analog inputs?

there are 3 pairs, each one can be used, and also these without analog inputs
 

ahct125

szlovak
Please read the thread fully BEFORE wasting your time typing.

Most of those members posting here already have 5v0 ICD2-USB working.

We know that 5v0 is too high for PIC24 and dsPIC33 families - all are 3v3 devices.
--- by the way dsPIC30 are all 5v0 devices - not 3v3 as you state.

If you read thread and understood, you would know that ICD2 monitors target Vdd and modifies +VHH according to the PIC selected, this being transparent to the user.

However, you have given me an idea! - thank you.

**************
potyo
How about running the whole of the ICD2 from 3v3.
The pot/divs for analogue inputs would need modification - but would the rest work? - This would obviously not work at other voltages.

There again, how about a variable ICD2-Vdd based on the monitored target Vdd?
When target is 5v0 then ICD2-Vdd is 5v0
When target is 3v3 then ICD2-Vdd is 3v3 etc.

If target Vdd was less than 3v3 the 4550 would need to stay at 4v2 for 48Mhz although USB engine only requires 3v3. Starting to get complicated!
This would not require buffers - or if you want signal isolation buffers could be used. I must try it!

best regards ... Polymath

Added after 12 minutes:

szlovak
If you had read the thread:
potyo said:
Only to avoid misunderstanding, I've checked now the 24FJ128GA's and dsPIC33F Family's datasheet, and i found these maximums:

Voltage on VDD with respect to VSS........................................................................ -0.3V to +4.0V
Voltage on any combined analog and digital pin and MCLR, with respect to VSS.... -0.3V to (VDD + 0.3V)
Voltage on any digital-only pin with respect to VSS................................................. -0.3V to +6.0V(+5.6V)
Voltage on VDDCORE with respect to VSS............................................................... -0.3V to +3.0V

I have double checked this - POTYO is correct

not In datasheet Vih max for MCLR is 3.3V as you suggest.

Polymath
 

pic vdd low icd2

polymath said:
szlovak

If you read thread and understood, you would know that ICD2 monitors target Vdd and modifies +VHH according to the PIC selected, this being transparent to the user.

However, you have given me an idea! - thank you.

I understand whole thread. 5V on MCLR will fry this chip and Mplab does not say a word about it
 

pic icd2 target datasheet

Maybe we can cheat the Mplab by run whole ICD with 3.3V and change a little bit resistor value (voltage divider) for the voltage monitoring so that the Mplab will see the ICD still operate at 5V. I think I need to try it.

Regards.
 

usb to ttl icd2

be_jouster said:
Maybe we can cheat the Mplab by run whole ICD with 3.3V and change a little bit resistor value (voltage divider) for the voltage monitoring so that the Mplab will see the ICD still operate at 5V. I think I need to try it.

Regards.

be_jouster

READ thread and come up with your OWN and ORIGINAL suggestions.

I just said this just 2 postings back!!!!!!
If you had read the thread you would know that MPLAB-ICD2Original combination does run the outputs at Target-Vdd and suitable for the SELECTED Device.

Polymath
 

icd2.5 3.3v

svlovak

You obviously DO NOT UNDERSTAND - if you did you would not ask the question.
I will try one more time to explain - I will put it very very simply just for you!

Firstly refer to ICD2-Original not one of these poor lesser designs - they are NOT Clones - Clones are identical to the original in all aspects of function and performance.

+Vdd to target is controlled by RA4 - this can only supply 5v0 to the target - this is NEVER enabled for 3v3 devices - You MUST select the correct device and uncheck the "Power target from ICD2" checkbox in MPLAB for voltages other than 5v0.
For 3v3 devices the 'checkbox' is unavailable and Target Vpp is set to 3v3 - TRY IT!

as stated earlier in thread
my research shows:
ICD2 communicates to PIC24 and other devices at 3v3.
Target Power must be from an external supply for 3v3 devices.
The ICD2 can only supply 5V. (my Advanced Transdata PIC-ICD has variable Vdd)
Uncheck the "Power target from ICD2" checkbox in MPLAB.
Connect Debug+Vdd pin to Target +V supply.
ICD2 will sense Target +V supply (RA0).
ICD2 will scale PGC and PGD to the sensed Target +V level (Target+V <buffers> Gnd).

Why should MPLAB say anything? This function is out of the hands of an IDIOT user. If the IDIOT user selects the wrong device and ignores the MPLAB warning [ICDWarn0020] THEY deserve to fry - not the chip!

What else do you not understand?

best regards ... Polymath
 

74ahc125 74ahct125

None of the things you were explaining in yout last post were necessary, sorry. :D

So Vpp isn't mentioned in pdf. And state HIGH for MCLR is 3.3 and 5V for programming. EOT

Looking in to the schematic of original ICD2 , and this let say "clone" ( ), one cut in pcb and one wire will fix the problem. I can't test it. RC1 controls in case of pic24 3.3V, RC2 will turn on 5V for programming mode. So cutting off the path to emitter of T2, connecting it to Vdd in ICSP might work.

states for MCLR pin in original ICD2 are:

hold in reset : RC1=H, RC2=L
ICSP Vdd on MCLR : RC1=L, RC2=H
5V on MCLR : RC1=H, RC2=H
 

icd2 pic24f

szlovak, these connections are already mentioned before here:

And the logic signals for the certain output levels:
hold in reset: RC0=H, RC1=H, RC2=L
ICSP Vdd on MCLR: RC0=H, RC1=L, RC2=H
Vpp on MCLR: RC0=L, RC1=H, RC2=H
MCLR in HiZ: RC0=H, RC1=H, RC2=H
 

microcontroller cheat sheet pic24f

Hi guys,
I came accross a similar problem a little while back on a uni project. I was using a WARP13 programmer and needed to program a PIC at 3.3V so I knocked up an adaptor board to place between the programmer and the target system. I used a MAX3378, which is basically a tri-statable bi-directional level translator. You feed two supply voltages into it and it translated bi-directionally between the two. I added a switch to select between 13V (from the WARP13) and the target Vdd to go onto the MCLR pin of the target PIC. This switch could probably quite easily be implemented electronically. The warp13 only supplied the 13V Vpp while programming, and removed it when finished (or set it to 5V - I can't remember now - I will double check if I can find the programmer), so this voltage was used to bring the MAX3378 out of tri-state during programming - This meant when programming was finished, the target system could run happily without disconnecting the programmer. You can probably still get the MAX3378 as a free sample from Maxim.
Note - I got this to work nicely for a few PIC16F and small 18F chips, but for some reason it wouldn't work reliably for a PIC18F8720 (80 pin TQFP jobbie) - I never really found out why?!?
Anyway - Heres the schematic - don't know if it will help or inspire any improvements - I hope so!
[/img]

Added after 7 minutes:

Whoops - didn't attach the schematic
Hopefully it worked this time!
 

potyo icd2 clone

Gobol said:
LVC can be used to convert 5V levels to 3.3V, (but how to cope with data transmittion direction... )
maybe using simple 3.3V zeners and transistors would do the trick... ?

Just use a voltage divider, with only a couple I/O it's easy.

5V i/o ----330--+--3.3V i/o
|
660
|
gnd

LOL of course the no leading spaces messed that up. The lower resistor connects at the + .

Out from 5V the divider gives 3.3 the other side. In to the 5V input sees 3.3V as still a high, the 3.3V ouput just has the extra 660 resistor to ground. Use 2 330 ohms for the 660..

May need to double or triple these values etc for lower powered i/o pins..

That's all the 5V to 3.3V interfacing most things really need. After a few pins though the IC's still make sense..
 

potyo icd2 klón

Alan69 said:
Gobol said:
5V i/o ----330--+--3.3V i/o
|
660
|
gnd

LOL of course the no leading spaces messed that up. The lower resistor connects at the + .

Out from 5V the divider gives 3.3 the other side. In to the 5V input sees 3.3V as still a high, the 3.3V ouput just has the extra 660 resistor to ground. Use 2 330 ohms for the 660..

May need to double or triple these values etc for lower powered i/o pins..

That's all the 5V to 3.3V interfacing most things really need. After a few pins though the IC's still make sense..

it's not so easy. PORTC in 16f877(A) is Schmitt triggered, and it doesn't see anything below 3.58V .
 

pic 3.3v

Hi szlovak
I do not think Alan69 has tried his own suggestion.

The 877A Data Sheet give 0.3Vdd and 0.8Vdd as schmitt levels for all Vdd.

A Vdd of 5v =>> 1v5 and 4v0 input trigger levels.

Alan96, as svlovak says - it will not work.

regards ... Polymath
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top