Observation on PICkit 2 schematic

159 views
Skip to first unread message

Mark Rages

unread,
Feb 15, 2007, 5:42:13 AM2/15/07
to pickit...@googlegroups.com
I was looking at the PICkit 2 schematic tonight, and I noticed
something interesting. I've never given it a detailed examination
before.

The schematic is in the appendix at page 45 of the users' guide.

On page 2, there is a level limiter circuit to prevent any of ICSPCLK,
ICSPDAT, or AUX from exceeding VDD_TGT. This circuit is composed of
PNP transistors in common-collector configuration. Their bases are
biased to a diode drop below VDD_TGT. This diode cancels the Vbe drop
of the transistor, so it begins to conduct when the emitter exceeds
VDD_TGT. Simple, effective design. But I think it may draw too much
current out of the '2550 sometimes.

When the corresponding output is high, the current through R10,R14, or
R19 will be (+5V_USB-VDD_TGT)/10 amperes.

The absolute maximum current draw for the '2550 is 25mA. This will
be exceeded if there is more than 0.25V difference between +5V_USB and
VDD_TGT.

In practical terms, this means that programming a 24FJ* part, with
VDD_TGT at 3.3V, will draw too much current of the '2550. I calculate
170 mA per pin, although in practice less current will flow due to the
finite admittance of the '2550's output circuit.

(The power ratings on R10, R14, R19, Q2, Q3, and Q5 are also exceeded
by approximately 2X. But the ISCP signals have about 50% duty cycle,
so they are not likely to overheat.)

Regards,
Mark
markrages@gmail
--
You think that it is a secret, but it never has been one.
- fortune cookie

Wouter van Ooijen

unread,
Feb 15, 2007, 6:10:28 AM2/15/07
to pickit...@googlegroups.com
> The absolute maximum current draw for the '2550 is 25mA. This will
> be exceeded if there is more than 0.25V difference between +5V_USB and
> VDD_TGT.

That is one part I did not copy when I made my pickit2 clone :) But my
clone does not attempt to program non-5V parts anyway, so I can't claim
this was due to my cleverness.

I think (fear?) your analysis of this part of the circuit is correct.

Wouter van Ooijen

-- -------------------------------------------
Van Ooijen Technische Informatica: www.voti.nl
consultancy, development, PICmicro products
docent Hogeschool van Utrecht: www.voti.nl/hvu


Mark Rages

unread,
Feb 15, 2007, 8:25:26 AM2/15/07
to pickit...@googlegroups.com
On 2/15/07, Wouter van Ooijen <wou...@voti.nl> wrote:
>
> > The absolute maximum current draw for the '2550 is 25mA. This will
> > be exceeded if there is more than 0.25V difference between +5V_USB and
> > VDD_TGT.
>
> That is one part I did not copy when I made my pickit2 clone :) But my
> clone does not attempt to program non-5V parts anyway, so I can't claim
> this was due to my cleverness.
>
> I think (fear?) your analysis of this part of the circuit is correct.
>
> Wouter van Ooijen
>

There was an interesting discussion on the Piclist about USB voltage a
little while ago:
http://www.nabble.com/USB-voltage-tf2720643.html#a7586583

If the USB voltage varies from 4.5 to 5.25V, the PICkit 2's output
voltage will also vary, because +5V_USB is the A/D reference. From
3.3V nominal it will vary from 3.0 to 3.4 V. The Vpp voltage will
vary as well. I don't have all the programming specifications
memorized, but I looked at a couple and this seems within spec. (One
of the specs I pulled requests a resolution of 250mV on the supplies.
The PICkit 2 provides this precision, but not this accuracy. The
resulting voltage is still within limits, however.)

I don't think this affects utility as a programmer, but for other
potential PICkit uses, such as a data logger or function generator,
this limits the accuracy to the accuracy of the +5V_USB voltage.

There is an on-chip voltage regulator brought out to pin Vusb. But
the specs on this regulator are looser than the +5V_USB voltage! So
it wouldn't be a good reference for the D/A.

Wouter van Ooijen

unread,
Feb 15, 2007, 9:07:45 AM2/15/07
to pickit...@googlegroups.com
> If the USB voltage varies from 4.5 to 5.25V

4.4V, and that's below the minimum specified by uChip for erase on some
chips, and the Pickit adds some loss in the series fet...

walter....@microchip.com

unread,
Feb 15, 2007, 4:29:02 PM2/15/07
to pickit-devel
Actually, for a low-power device (such as PICkit 2) the USB spec
allows voltages of down to 4.2v.

As to the clamp current, the PIC18F2550 outputs will limit the current
coming out of them to 25mA without damage. In other words, it's not
possible to pull more than about 25mA out of a pin. This is one of
the nice things about using PICs; it prevents damage to the parts from
accidental shorts and overloads.

That said, I'm not crazy about the clamps either.

Regards,
Walter Kicinski

Wouter van Ooijen

unread,
Feb 15, 2007, 5:02:03 PM2/15/07
to pickit...@googlegroups.com
> As to the clamp current, the PIC18F2550 outputs will limit the current
> coming out of them to 25mA without damage. In other words, it's not
> possible to pull more than about 25mA out of a pin. This is one of
> the nice things about using PICs; it prevents damage to the parts from
> accidental shorts and overloads.

Where did you find that information? AFAIK no such current limit circuit
exists.

Morim

unread,
Feb 16, 2007, 2:52:21 AM2/16/07
to pickit-devel
> Where did you find that information? AFAIK no such current limit circuit
> exists.

Hmm, I have also heard this. I know I read it in Myke Predko's book
"Programing and customizing th Pic microcontrollers", but also think
that it is mentioned in some Data sheet from Microchip.

/Morim

Wouter van Ooijen

unread,
Feb 16, 2007, 3:20:31 AM2/16/07
to pickit...@googlegroups.com

OK. This myth pops up every now and then. So far it seems to be caused
by misinterpretation of (sometimes badly worded) uChip documents.

Mark Rages

unread,
Feb 16, 2007, 3:51:17 AM2/16/07
to pickit...@googlegroups.com
On 2/16/07, Wouter van Ooijen <wou...@voti.nl> wrote:
>
> >> Where did you find that information? AFAIK no such current
> >> limit circuit exists.
> >
> > Hmm, I have also heard this. I know I read it in Myke Predko's book
> > "Programing and customizing th Pic microcontrollers", but also think
> > that it is mentioned in some Data sheet from Microchip.
>
> OK. This myth pops up every now and then. So far it seems to be caused
> by misinterpretation of (sometimes badly worded) uChip documents.
>
> Wouter van Ooijen

Well, I couldn't resist doing the experiment.

At 5V supply, a "high" output from a 16F690 sourced about 35mA through
a 1 ohm resistor. The chip continued to function normally during and
after the experiment.

So some kind of current limiting happens, whether or not the datasheet
mentions it.

Wouter van Ooijen

unread,
Feb 16, 2007, 4:02:47 AM2/16/07
to pickit...@googlegroups.com
> So some kind of current limiting happens, whether or not the datasheet
> mentions it.

True in your experiment (volatage, frequency, temperature, etc), and
with your (necesarrily limited) ability to witness 'normal functioning'.
But you have operated the chip outside the 'absolute maxima', so
formally/legally speaking you can't assume the chip to survive (much
less function normally *during* this 35mA situation).

This (of course) does not guarantee that the chip did not survive or
even function normally.

Think of it as corssing the street without looking right or left. There
is no guarantee that you will die.

walter....@microchip.com

unread,
Feb 20, 2007, 5:05:20 PM2/20/07
to pickit-devel
Here is how the 18F2550 pins self-limit the current to within the
absolute maximum ratings in the PICkit 2:

Refer to Figure 27-25 in the PIC18F2220/2320/4220/4320 datasheet:
http://ww1.microchip.com/downloads/en/DeviceDoc/39599F.pdf
(The AC/DC graphs section is absent from the 18F2550 datasheet, but
this is a directly related part)

Assume that the target has a VDD = 3.0V. Thus, the clampling
transistors in the PICkit 2 clamp the PGC voltage to about 3V. Assume
the PGC pin is outputting 5V; this voltage is dropped across a 33 Ohm
resistor.

(5-3)/33 = 61mA.

Looking at Fig 27-25, we see that at an output current of 25mA, the
VOH of PGC is typically about 3.1 Volts. Therefore, we cannot
actually be pulling 61mA out of the pin as it can only provide 3.1V at
25mA (and the clamp is at 3V too!).

Since we are working with a non-linear graph characteristic, and not a
formula for VOH given IOH, the final pin state cannot be directly
computed, but if we fit it to the graph we can determine that:

At Vclamp = 3.0v,
PGC VOH = ~3.6V with a current of ~19mA. This is within the maximum
rating of 25mA, so we are safe.

Also, the current through the output FET non-zero resistance (what
causes the drop in VOH) will cause heating. As the FET heats, its
resistance will increase and the VOH will tend to droop lower to the
Min line.

Thus, the PICkit 2 clamping circuit exploits the inherent resistance
in the output FET (and the 33 Ohms helps too) to ensure that the pin
current does not exceed the absolute maximum rating.

Thanks for Keith Curtis and Joe Julicher to contributing information
on this.

Regards,
Walter Kicinski

Jeff

unread,
Feb 21, 2007, 12:31:46 AM2/21/07
to pickit...@googlegroups.com
On Tue February 20 2007 14:05, walter....@microchip.com wrote:
>
> Refer to Figure 27-25 in the PIC18F2220/2320/4220/4320 datasheet:
> http://ww1.microchip.com/downloads/en/DeviceDoc/39599F.pdf
>
This is off-topic, but I've always wondered why the datasheet file names seem
to have no relation to the PIC part. Or is there some numbering scheme that
I've not figured out?

Is there a cross reference list that matches PIC names with datasheet names?

Jeff

Mark Rages

unread,
Feb 21, 2007, 1:39:09 AM2/21/07
to pickit...@googlegroups.com
On 2/20/07, walter....@microchip.com <walter....@microchip.com> wrote

>
> Here is how the 18F2550 pins self-limit the current to within the
> absolute maximum ratings in the PICkit 2:
>
> Refer to Figure 27-25 in the PIC18F2220/2320/4220/4320 datasheet:
> http://ww1.microchip.com/downloads/en/DeviceDoc/39599F.pdf
> (The AC/DC graphs section is absent from the 18F2550 datasheet, but
> this is a directly related part)

Walter,

Thank you for this explanation. I have only a couple comments:

1) I think the Max line should be labeled -40 C instead of 125 C. Is
this right?

2) The resistors in question are 10 ohms in my PICkit 2s. R10, R14, R19.

3) If the attachment goes through, I plotted an old-fashioned load
line on the Voh/Ioh plot. I actually plotted two, one with a slope of
10 ohms and one with a slope of 33 ohms. It confirms your
calculation. It looks like the current is about 23 mA for 10 ohms.

Thank you for researching this. It still looks to me like the
absolute maximum current could be exceeded if the PICkit is operated
in subfreezing temperatures. Thankfully, my workshop, while cold, is
not that cold!

loadline2725.png

Wouter van Ooijen

unread,
Feb 21, 2007, 2:10:23 AM2/21/07
to pickit...@googlegroups.com
> Is there a cross reference list that matches PIC names with
> datasheet names?

The MPLAB .dev files seem to contain some of these numbers, but not the
revision letter. Some info from these files (flash chips only) is
attached.

Wouter van Ooijen

unread,
Feb 21, 2007, 2:10:23 AM2/21/07
to pickit...@googlegroups.com
> Looking at Fig 27-25, we see that at an output current of 25mA, the
> VOH of PGC is typically about 3.1 Volts. Therefore, we cannot
> actually be pulling 61mA out of the pin as it can only provide 3.1V at
> 25mA (and the clamp is at 3V too!).

The devil is in the word 'typical'. You should not use typical values as
critical design parameters. It might work now, with this (revision of
the) chip, and with this phase of the moon. Bets are off for any other
circumstances.

> PGC VOH = ~3.6V with a current of ~19mA. This is within the maximum
> rating of 25mA, so we are safe.

Being within the maximum rating is *not* enough to be safe, at least not
if you want your chip to function. It is enough to have your chip
survive.

> Thus, the PICkit 2 clamping circuit exploits the inherent resistance
> in the output FET (and the 33 Ohms helps too) to ensure that the pin
> current does not exceed the absolute maximum rating.

but it does so in an IMHO totally unresponsible manner. about as
responsible as the famous direct-120V feed appnote.

Rob Hamerling

unread,
Feb 21, 2007, 3:10:19 AM2/21/07
to pickit...@googlegroups.com
[Jeff]

> > Is there a cross reference list that matches PIC names with
> > datasheet names?

I have not found any systematic too!

[Wouter]


>
> The MPLAB .dev files seem to contain some of these numbers, but not the
> revision letter. Some info from these files (flash chips only) is
> attached.

When building/revising the .cfg files for Xwisp2 I use two sources to
find datasheets and memory programming specifications:
- the 'datasheet finder' on the Microchip site
- the .dev files
Unfortunately both are not complete and not errorfree and then you
won't find it or find the wrong number.
Recently I was looking for the memory programming specifications of
the 12HV615. I don't remember how I found it, but not via the .dev
files and not via datasheet finder.

Regards, Rob.


--
Rob Hamerling, Vianen NL (http://www.robh.nl/)

walter....@microchip.com

unread,
Feb 21, 2007, 5:30:35 PM2/21/07
to pickit-devel
Mark,

Replies to your questions are below:

> 1) I think the Max line should be labeled -40 C instead of 125 C. Is
> this right?

I believe this is right, but haven't confirmed this yet.

> 2) The resistors in question are 10 ohms in my PICkit 2s. R10, R14, R19.

You are correct! My mistake.

> 3) If the attachment goes through, I plotted an old-fashioned load
> line on the Voh/Ioh plot. I actually plotted two, one with a slope of
> 10 ohms and one with a slope of 33 ohms. It confirms your
> calculation. It looks like the current is about 23 mA for 10 ohms.
>
> Thank you for researching this. It still looks to me like the
> absolute maximum current could be exceeded if the PICkit is operated
> in subfreezing temperatures. Thankfully, my workshop, while cold, is
> not that cold!

The designers of this circuit were also quick to point out that (as
with most datasheet specs) the 25mA Absolute Maximum number is quite
conservative and they were comfortable with a corner case that might
exceed it a little. (The drop curve also becomes steeper as the
current increases.)

If we ever get a PICkit 2 back with damaged ICSP pins I'll be sure to
call up Wouter and we'll go on a shouting rampage before revving the
PICkit 2 to increase the 10 Ohm resistors! :-P

Regards,
Walter

PS - keeping the resistance lower (10 Ohms) has the positive of
allowing more signal and pin capacitance on the target to be driven.

PPS - Do not use your PICkit 2 in sub-freezing temperatures. It's not
good for you, and Microchip Technology Inc. is not responsible if you
get frostbite because you can't plug it into USB with mittens on. ;-)

Reply all
Reply to author
Forward
0 new messages