Rules | Recent posts | topic RSS | Search | Register  | Log in

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


Goto page 1, 2, 3, 4  Next
 
Post new topic  Reply to topic    EDAboard.com Forum Index -> Microcontrollers -> ICD2 USB clone - how to get it to work with 3.3V PIC24s ???
Arabic versionBulgarian versionCatalan versionCzech versionDanish versionGerman versionGreek versionEnglish versionSpanish versionFinnish versionFrench versionHindi versionCroatian versionIndonesian versionItalian versionHebrew versionJapanese versionKorean versionLithuanian versionLatvian versionDutch versionNorwegian versionPolish versionPortuguese versionRomanian versionRussian versionSlovak versionSlovenian versionSerbian versionSwedish versionTagalog versionUkrainian versionVietnamese versionChinese version
Author Message
Gobol



Joined: 29 Sep 2005
Posts: 37
Location: PL


Post21 Jun 2006 9:02   ICD2 USB clone - how to get it to work with 3.3V PIC24s ???
tags: icd2 usb icd2 clone dspic33f icd 2 usb icd2 clone icd2 clone pic24 ic2 clone icd2 dspic33

Hi,
I've got simple question - how to programm 3.3V PIC24/dsPIC33F with "our" ICD2 USB clone ?
I'd add that when I downloaded PIC24 firmware into ICD2 it didn't pass the self test. I t seems that there is a possibility of getting it work with new chips.
Maybe simple header with some kind of voltage-level-changer would do the trick?
Back to top
View user's profile
Gobol



Joined: 29 Sep 2005
Posts: 37
Location: PL


Post25 Jun 2006 11:58   Re: ICD2 USB clone - how to get it to work with 3.3V PIC24s

Anybody tried to do this ?
Back to top
View user's profile
potyo



Joined: 16 Apr 2006
Posts: 181
Helped: 10
Location: Ada, Vajdaság


Post25 Jun 2006 12:34   ICD2 USB clone - how to get it to work with 3.3V PIC24s ???

When i select an 24F or 33F device, after downloading the new os passes the self test. But i don't have these devices, so i don't know that icd programs these devices or not.
Back to top
View user's profile
manu



Joined: 14 Mar 2004
Posts: 178
Helped: 9
Location: France


Post25 Jun 2006 13:24   Re: ICD2 USB clone - how to get it to work with 3.3V PIC24s

Simply switch the power supply, no ?!
Back to top
View user's profile
potyo



Joined: 16 Apr 2006
Posts: 181
Helped: 10
Location: Ada, Vajdaság


Post25 Jun 2006 13:45   Re: ICD2 USB clone - how to get it to work with 3.3V PIC24s
tags: icd 3.3 v icd2 3.3v icd2 vdd icd2 supply icd2 vdd 3.3 3.3v icd2 icd2 powering target

manu wrote:
Simply switch the power supply, no ?!
what power supply? When you select an 3.3V device, powering the target device from icd2 is automatically disabled. If you have approx. 3.3V on the targets vdd pin, the self test must pass.
Back to top
View user's profile
Gobol



Joined: 29 Sep 2005
Posts: 37
Location: PL


Post26 Jun 2006 9:26   ICD2 USB clone - how to get it to work with 3.3V PIC24s ???
tags: icd2 clone pic icd2 icd 3.3 v icd2 3.3v icd2 pic clone icd2 pic icd2 clon

Hmm... I've tried to do self test without target board connected to ICD.... Maybe here is the clue..
So, the edaboard's ICD2 clone should work with new 3.3V PICs...
Back to top
View user's profile
potyo



Joined: 16 Apr 2006
Posts: 181
Helped: 10
Location: Ada, Vajdaság


Post26 Jun 2006 9:57   Re: ICD2 USB clone - how to get it to work with 3.3V PIC24s
tags: pgc 3.8v pic icd target vpp for pic

I haven't connected target to the icd, but through the protection diodes in the 74hc12x buffers when the pgd or pgc is high, there is approx 3.8V on the vdd pin. Look for my schematic at the http://www.edaboard.com/viewtopic.php?p=626164#626164

What is in the settings at the targets vpp, vdd, ...
Back to top
View user's profile
Gobol



Joined: 29 Sep 2005
Posts: 37
Location: PL


Post26 Jun 2006 10:43   ICD2 USB clone - how to get it to work with 3.3V PIC24s ???
tags: icd2 vdd icd2 mclr icd2 module vpp low icd2 target vdd low icd2 target vpp low mplab icd 2 - vpp low icd2 vpp low

I've created exactly the same project but on my own PCB. (btw: thanks for the sch).
Target Vdd - 0.00V
Target Vpp - 4.99V
MPLAB ICD2 Vpp - 12V

Self-test :
Target Vdd - Low
Module MCLR Vdd - Low

But I think it can be the problem because I have 74126 in HCT version... and I think I should replace it with HC (cmos level) one...
Back to top
View user's profile
be_jouster



Joined: 27 Jun 2006
Posts: 19
Helped: 1


Post28 Jun 2006 10:59   Re: ICD2 USB clone - how to get it to work with 3.3V PIC24s
tags: icd2 clone icd2 clone pic24 ic2 clone icd2 dspic33 pic icd2 icd2 pic 24 icd 3.3 v

Hi, all. I just get my Explorer 16 Board, the same problem still stuck in my mind. Is it OK to connect ICD2 Clone (Lothar version) that powered by +5V to the PIC24 & dsPIC33 that have lower operating voltage? If can, how to do it? Can I just separate both power supply (+5V for my ICD2 clone, +3.3V for my target device and of course with common ground)? Next thing, is it PGC & PGD on the target device (PIC24 & dsPIC33) can handle voltage signal more than +3.3V for example +4.7V with no harm to the target itself?

Best regards.

Added after 42 minutes:

I've tried download ICD2 24F-33F firmware OS to my ICD2 Clone and the result something like this:

Connecting to MPLAB ICD 2
...Connected
ICDWarn0030: MPLAB ICD2 is about to download a new operating system. If MPLAB IDE is just starting, it will appear to "hang" at the splash screen. Please be patient. MPLAB IDE will finish it's intialization after the OS is downloaded. (Note: You may wish to select to ignore this warning in the future.)
Downloading Operating System
Connecting to MPLAB ICD 2
...Connected
Setting Vdd source to target
ICDWarn0020: Invalid target device id (expected=0x40D, read=0x0)
...Reading ICD Product ID
Running ICD Self Test
...Passed
...Download Operating System Succeeded
Setting Vdd source to target
ICDWarn0020: Invalid target device id (expected=0x40D, read=0x0)
...Reading ICD Product ID
Running ICD Self Test
...Passed
MPLAB ICD 2 Ready

It has passed self test. But at Power tab it show:

Target Vdd = 5.00V
Target Vpp = 4.31V
MPLAB ICD2 Vpp = 12.62V

Is it okey?

Best regards.
Back to top
View user's profile
Gobol



Joined: 29 Sep 2005
Posts: 37
Location: PL


Post28 Jun 2006 15:44   Re: ICD2 USB clone - how to get it to work with 3.3V PIC24s
tags: pic icd2 icd2 pic 24 icd 3.3 v icd2 3.3v icd2 mclr pic icd2 programming high level icd2 datasheet

Look at the programming specification datasheet.... New 24/33 PIC's no longer require 13V Vpp... they're programmed by pulling MCLR high (3.3V - as far as I concern) and transmitting specific patterns via PGD/PGC to enable programming mode.

I don't know is it safe to put 4.7V on the lines... I personally think it's not... but I'm exploring new possibility : to buffer lines with 74LVC244 or 245 dual-octal-transceiver.
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... ?

If anybody has some clues, please post them. It would be very helpful.
How it is done in original ICD2 ?
Back to top
View user's profile
potyo



Joined: 16 Apr 2006
Posts: 181
Helped: 10
Location: Ada, Vajdaság


Post28 Jun 2006 17:47   ICD2 USB clone - how to get it to work with 3.3V PIC24s ???
tags: pgd and pgc buffer

For PGD and PGC lines you can use 74AHC126 buffers in icd-->target direction (HC126 is not suitable, because it has protection diodes between input pins and vdd), and HCT125 or AHCT125 buffers in the opposite direction. The HCT series has TTL compatible inputs, and they senses the >2V input signals as logical 1. You must supply the AHC chip from the targets vdd. My last schematic has these features, check it. However i don't know anything about the vpp.
Back to top
View user's profile
be_jouster



Joined: 27 Jun 2006
Posts: 19
Helped: 1


Post29 Jun 2006 4:00   Re: ICD2 USB clone - how to get it to work with 3.3V PIC24s
tags: pic pgd pgc input

I found this when I go thru the pic24 & dspic33 datasheet. All PGC & PGD are schmitt trigger input. Maybe we can think something here.....i hope..Neutral


Sorry, but you need login in to view this attachment

Back to top
View user's profile
Gobol



Joined: 29 Sep 2005
Posts: 37
Location: PL


Post29 Jun 2006 9:35   ICD2 USB clone - how to get it to work with 3.3V PIC24s ???
tags: pic24 firmware pic24 vpp mclr pic v pic24 vdd

Ok, but what to do with MCLR ?
PIC24 need Vih level of MCLR to enter into programming mode. Refer to fig.3-3 of DS39768A-page 10.
h**p://ww1.microchip.com/downloads/en/DeviceDoc/39768a.pdf

Maybe new firmware wouldn't set MCLR to Vpp (13V) but only to Vdd (release from reset - mode) ?

In this case the new device should be programmed with 5V levels... I guess I would try...
Back to top
View user's profile
potyo



Joined: 16 Apr 2006
Posts: 181
Helped: 10
Location: Ada, Vajdaság


Post29 Jun 2006 10:33   ICD2 USB clone - how to get it to work with 3.3V PIC24s ???
tags: icd2 24f

If i select an 24F device, my icd2 sets the targets vpp voltage to 5V.
Back to top
View user's profile
Gobol



Joined: 29 Sep 2005
Posts: 37
Location: PL


Post29 Jun 2006 12:39   ICD2 USB clone - how to get it to work with 3.3V PIC24s ???

have you checked this by multimeter or via programmer status window ?
Back to top
View user's profile
potyo



Joined: 16 Apr 2006
Posts: 181
Helped: 10
Location: Ada, Vajdaság


Post29 Jun 2006 12:47   ICD2 USB clone - how to get it to work with 3.3V PIC24s ???

Both
Back to top
View user's profile
polymath



Joined: 02 May 2006
Posts: 234
Helped: 21
Location: England


Post29 Jun 2006 22:03   Re: ICD2 USB clone - how to get it to work with 3.3V PIC24s
tags: icd2 clone clone icd2 icd2 supply icd2 3v3 icd2 clone 3v3 clon icd2 ds51292l

Check ICD Header ???.pdf DS51292L-page 5
http://ww1.microchip.com/downloads/en/DeviceDoc/ICD2_Header_51292L.pdf

It is clear that you cannot use ICD2 bufferless Clone directly on 3v3 devices.

Why not start thread to design a Header (RJ12/Header/RJ12) which directly connects to a standard 5v ICD2 with buffer/level converters on-board, which provides 3v3 supply and programming buffers?

Polymath


Last edited by polymath on 01 Jul 2006 13:50; edited 1 time in total
Back to top
View user's profile
be_jouster



Joined: 27 Jun 2006
Posts: 19
Helped: 1


Post30 Jun 2006 5:11   Re: ICD2 USB clone - how to get it to work with 3.3V PIC24s
tags: ic2 clone clone ic2 clon ic2 ic2 clone

In the IC2 clone, between RC4 and RC5, whice is input and whice is output? Just to know.

Thanks..
Back to top
View user's profile
bendjy



Joined: 06 May 2004
Posts: 10
Location: Sofia, Bulgaria


Post30 Jun 2006 8:22   Re: ICD2 USB clone - how to get it to work with 3.3V PIC24s
tags: icd2 clone pic icd2 icd2 3 3v icd2 pic clone icd2 pic icd2 clon

Hi All

In my ICD2 clone with 18f4550 I use SN74lvc1t45 as in/out buffer. I don't have 3,3V PIC and I do not know this is solution for these PIC's. For 5V PIC work fine.

sorry for english

Regards
bendjy
Back to top
View user's profile
polymath



Joined: 02 May 2006
Posts: 234
Helped: 21
Location: England


Post30 Jun 2006 13:21   Re: ICD2 USB clone - how to get it to work with 3.3V PIC24s

Here is an interesting article to add confusion:

http://www.edn.com/article/CA6335309.html?text=microchip

Are any level translators necessary on data and clock?

still seaching for an answer ........ Polymath
Back to top
View user's profile
potyo



Joined: 16 Apr 2006
Posts: 181
Helped: 10
Location: Ada, Vajdaság


Post30 Jun 2006 13:52   Re: ICD2 USB clone - how to get it to work with 3.3V PIC24s
tags: voltage of pic 24f mclr pic v

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: http://www.edaboard.com/download.php?id=89775 The problem is the 5V on the mclr pin of the 24F and 33F devices.
Back to top
View user's profile
polymath



Joined: 02 May 2006
Posts: 234
Helped: 21
Location: England


Post30 Jun 2006 23:56   Re: ICD2 USB clone - how to get it to work with 3.3V PIC24s
tags: pic24 and mclr mclr pic v

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


Last edited by polymath on 01 Jul 2006 1:30; edited 1 time in total
Back to top
View user's profile
potyo



Joined: 16 Apr 2006
Posts: 181
Helped: 10
Location: Ada, Vajdaság


Post01 Jul 2006 0:49   Re: ICD2 USB clone - how to get it to work with 3.3V PIC24s
tags: dspic33f icd 2 icd2 dspic33 pic icd2 icd2 pic 24 icd2 vdd icd2 mclr icd2 dspic33f

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?


Last edited by potyo on 01 Jul 2006 1:55; edited 1 time in total
Back to top
View user's profile
polymath



Joined: 02 May 2006
Posts: 234
Helped: 21
Location: England


Post01 Jul 2006 1:28   Re: ICD2 USB clone - how to get it to work with 3.3V PIC24s

Hi potyo

Yes I would like to resolve this matter too.

Have you read the link I posted?
http://www.edn.com/article/CA6335309.html?text=microchip

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

Your comment? ........ Polymath
Back to top
View user's profile
potyo



Joined: 16 Apr 2006
Posts: 181
Helped: 10
Location: Ada, Vajdaság


Post01 Jul 2006 1:48   ICD2 USB clone - how to get it to work with 3.3V PIC24s ???
tags: icd 3.3 v icd2 3.3v icd2 vdd icd2 mclr icd2 supply icd2 vdd 3.3 icd2 target vdd low

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: http://www-s.ti.com/sc/psheets/scaa034c/scaa034c.pdf

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.
Back to top
View user's profile
polymath



Joined: 02 May 2006
Posts: 234
Helped: 21
Location: England


Post01 Jul 2006 13:44   Re: ICD2 USB clone - how to get it to work with 3.3V PIC24s
tags: icd2 usb icd2 clone pic icd2 mcu.cz usb icd2 clone usb pic icd schematic icd2 clone pic24 ic2 clone

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:
http://www.mcu.cz/modules/news/article.php?storyid=538
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
Back to top
View user's profile
potyo



Joined: 16 Apr 2006
Posts: 181
Helped: 10
Location: Ada, Vajdaság


Post02 Jul 2006 1:29   ICD2 USB clone - how to get it to work with 3.3V PIC24s ???

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"?
Back to top
View user's profile
polymath



Joined: 02 May 2006
Posts: 234
Helped: 21
Location: England


Post02 Jul 2006 15:40   Re: ICD2 USB clone - how to get it to work with 3.3V PIC24s
tags: icd2 usb pic icd2 icd2 pic usb to icd2 icd2 mclr pic icd usb icd2 supply

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
Back to top
View user's profile
szlovak



Joined: 25 Jan 2005
Posts: 22


Post05 Jul 2006 18:56   Re: ICD2 USB clone - how to get it to work with 3.3V PIC24s
tags: dspic33f icd 2 icd2 dspic33 pic icd2 programming with icd2 5 pin icd2 pic 24 icd 3.3 v icd2 3.3v

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 wrote:
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
Back to top
View user's profile
polymath



Joined: 02 May 2006
Posts: 234
Helped: 21
Location: England


Post06 Jul 2006 0:11   Re: ICD2 USB clone - how to get it to work with 3.3V PIC24s
tags: icd2 usb dspic33f icd 2 icd2 dspic33 pic icd2 icd2 pic 24 icd 3.3 v icd2 3.3v

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 wrote:

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
Back to top
View user's profile
Post new topic  Reply to topic    EDAboard.com Forum Index -> Microcontrollers -> ICD2 USB clone - how to get it to work with 3.3V PIC24s ???
Page 1 of 4 All times are GMT + 2 Hours
Goto page 1, 2, 3, 4  Next


Abuse || Administrator || Moderators || Support us || sitemap
topic RSS