| Author |
Message |
Gobol
Joined: 29 Sep 2005 Posts: 37 Location: PL
|
21 Jun 2006 8:02 icd2 3.3v |
|
|
|
|
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 |
|
 |
Gobol
Joined: 29 Sep 2005 Posts: 37 Location: PL
|
25 Jun 2006 10:58 icd2 usb clone |
|
|
|
|
| Anybody tried to do this ?
|
|
| Back to top |
|
 |
potyo
Joined: 16 Apr 2006 Posts: 181 Helped: 10 Location: Ada, Vajdaság
|
25 Jun 2006 11:34 icd2 usb |
|
|
|
|
| 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 |
|
 |
manu
Joined: 14 Mar 2004 Posts: 178 Helped: 9 Location: France
|
25 Jun 2006 12:24 icd2 pic24 |
|
|
|
|
| Simply switch the power supply, no ?!
|
|
| Back to top |
|
 |
potyo
Joined: 16 Apr 2006 Posts: 181 Helped: 10 Location: Ada, Vajdaság
|
25 Jun 2006 12:45 usb icd2 clone |
|
|
|
|
| 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 |
|
 |
Gobol
Joined: 29 Sep 2005 Posts: 37 Location: PL
|
26 Jun 2006 8:26 icd2 clone 3.3v |
|
|
|
|
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 |
|
 |
potyo
Joined: 16 Apr 2006 Posts: 181 Helped: 10 Location: Ada, Vajdaság
|
26 Jun 2006 8:57 icd2 clone usb |
|
|
|
|
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 |
|
 |
Gobol
Joined: 29 Sep 2005 Posts: 37 Location: PL
|
26 Jun 2006 9:43 dspic33 icd2 |
|
|
|
|
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 |
|
 |
be_jouster
Joined: 27 Jun 2006 Posts: 19 Helped: 1
|
28 Jun 2006 9:59 icd2 3,3v |
|
|
|
|
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 |
|
 |
Gobol
Joined: 29 Sep 2005 Posts: 37 Location: PL
|
28 Jun 2006 14:44 dspic33f icd2 |
|
|
|
|
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 |
|
 |
potyo
Joined: 16 Apr 2006 Posts: 181 Helped: 10 Location: Ada, Vajdaság
|
28 Jun 2006 16:47 icd2 dspic33 |
|
|
|
|
| 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 |
|
 |
be_jouster
Joined: 27 Jun 2006 Posts: 19 Helped: 1
|
29 Jun 2006 3:00 icd2 pic24 |
|
|
|
|
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..
|
|
| Back to top |
|
 |
Gobol
Joined: 29 Sep 2005 Posts: 37 Location: PL
|
29 Jun 2006 8:35 mplab ic2 device id 0x0 |
|
|
|
|
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 |
|
 |
potyo
Joined: 16 Apr 2006 Posts: 181 Helped: 10 Location: Ada, Vajdaság
|
29 Jun 2006 9:33 pic24 icd2 |
|
|
|
|
| If i select an 24F device, my icd2 sets the targets vpp voltage to 5V.
|
|
| Back to top |
|
 |
Gobol
Joined: 29 Sep 2005 Posts: 37 Location: PL
|
29 Jun 2006 11:39 icd2 3v3 |
|
|
|
|
| have you checked this by multimeter or via programmer status window ?
|
|
| Back to top |
|
 |
potyo
Joined: 16 Apr 2006 Posts: 181 Helped: 10 Location: Ada, Vajdaság
|
29 Jun 2006 11:47 usb 3,3v |
|
|
|
|
| Both
|
|
| Back to top |
|
 |
polymath
Joined: 02 May 2006 Posts: 236 Helped: 23 Location: England
|
29 Jun 2006 21:03 3.3v icd2 |
|
|
|
|
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 12:50; edited 1 time in total |
|
| Back to top |
|
 |
be_jouster
Joined: 27 Jun 2006 Posts: 19 Helped: 1
|
30 Jun 2006 4:11 icd2 programming 3.3v |
|
|
|
|
In the IC2 clone, between RC4 and RC5, whice is input and whice is output? Just to know.
Thanks..
|
|
| Back to top |
|
 |
bendjy
Joined: 06 May 2004 Posts: 10 Location: Sofia, Bulgaria
|
30 Jun 2006 7:22 cloning usb id |
|
|
|
|
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 |
|
 |
polymath
Joined: 02 May 2006 Posts: 236 Helped: 23 Location: England
|
|
| Back to top |
|
 |
potyo
Joined: 16 Apr 2006 Posts: 181 Helped: 10 Location: Ada, Vajdaság
|
30 Jun 2006 12:52 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: 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 |
|
 |
polymath
Joined: 02 May 2006 Posts: 236 Helped: 23 Location: England
|
30 Jun 2006 22:56 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
Last edited by polymath on 01 Jul 2006 0:30; edited 1 time in total |
|
| Back to top |
|
 |
potyo
Joined: 16 Apr 2006 Posts: 181 Helped: 10 Location: Ada, Vajdaság
|
30 Jun 2006 23:49 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?
Last edited by potyo on 01 Jul 2006 0:55; edited 1 time in total |
|
| Back to top |
|
 |
polymath
Joined: 02 May 2006 Posts: 236 Helped: 23 Location: England
|
01 Jul 2006 0:28 how to use icd2 |
|
|
|
|
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 |
|
 |
Google AdSense

|
01 Jul 2006 0:28 Ads |
|
|
|
|
|
|
| Back to top |
|
 |
potyo
Joined: 16 Apr 2006 Posts: 181 Helped: 10 Location: Ada, Vajdaság
|
01 Jul 2006 0:48 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: 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 |
|
 |
polymath
Joined: 02 May 2006 Posts: 236 Helped: 23 Location: England
|
01 Jul 2006 12:44 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:
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 |
|
 |
potyo
Joined: 16 Apr 2006 Posts: 181 Helped: 10 Location: Ada, Vajdaság
|
02 Jul 2006 0:29 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"?
|
|
| Back to top |
|
 |
polymath
Joined: 02 May 2006 Posts: 236 Helped: 23 Location: England
|
02 Jul 2006 14:40 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
|
|
| Back to top |
|
 |
szlovak
Joined: 24 Jan 2005 Posts: 22
|
05 Jul 2006 17:56 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 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 |
|
 |
polymath
Joined: 02 May 2006 Posts: 236 Helped: 23 Location: England
|
05 Jul 2006 23:11 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 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 |
|
 |