Hysteresis on dsPIC ports?

J

Joerg

Jan 1, 1970
0
Hello,

This really blows my mind and I think I've arrived at the decision not
to use their uC in the future. But a client does. It's a dsPIC and while
the datasheet says that the IO ports have Schmitt characteristics there
is no mention of how much hysteresis. So, I dutifully opened a support
ticket asking for the hysteresis. The answer came promptly but floored
me. They do not know (!). Sounds like a textbook answer from Outsourcia.
I shall contact the sales office and if our app is deemed "worthy" they
might or might not process such request.

<shaking head>

Anyhow, does anyone know what the hysteresis on dsPIC ports is?
 
J

Joerg

Jan 1, 1970
0
Hand a board a copy of the email results to Dave the EE blog guy, Sit
back and watch the fireworks.

Oh yeah, he'd tear them apart in mid-air :)

"Sir, why are this quarter's results so dismal?" ... "Well, we have been
daved."
 
J

Joerg

Jan 1, 1970
0
Robert said:
Measure it!
Then publish and take *all* of the credit.


I don't have one here and the client hasn't built it yet. Plus we'd need
guaranteed limits, not just from one wafer. MicroChip called it
"unpublished electrical characteristics". Pathetic. Taught me a lesson
about these products.
 
J

Joerg

Jan 1, 1970
0
Joel said:
My suspicion is that PICs are so popular these days that their "support"
department is the same as you get with most software companies -- the
1st tier are essentially just there to read the data sheet back to you,
since the answers to a very large percentage of support requests are
found right there.

Blowing off a client with a remark along the lines of "the sales guys
will dig into that if your sales volume is deemed worthy" is, ahem, not
a very polite way to deal with their most important part of biz, the
sales channel.

Of course, they should have automatically escalated your request to the
next tier when it became clear they didn't know the answer to your
specific question. Someone's making a judgement call that that spec
isn't very important, I'd guess, which is poor.

Yep. So far I haven't used PICs in any of my "from scratch" designs. And
I guess after this episode I won't. I need parts that are characterized
a bit more thorough than those.
 
J

Joerg

Jan 1, 1970
0
Jan said:
Bull, there is a large difference between 'Schmitt characteristics'
and 'is a Schmitt trigger input'.
It means in fact that you *cannot* use it as a Schmitt trigger input,
but that you *should expect* a Schmitt trigger like behaviour when driving it with some ramp.
I am not saying Microchip is all in the clear here, but *unless* it is specified
as a Schmitt trigger input, you cannot assume so.


Nope. Quote from the dsPIC datasheet: "All I/O input ports feature
Schmitt Trigger inputs ..."

It is simply nice that they bothered to point out that gate's behaviour, they did
not have to.
LOL

Sorry, for my line of work that is not good enough. How come Texas
Instruments is able to diligently specify the guaranteed min-max values?
See page 24:

http://focus.ti.com/lit/ds/symlink/msp430f2011.pdf

_That's_ how a good datasheet is written.
 
J

Joerg

Jan 1, 1970
0
Jan said:
I remember reading a datasheet of the new PICs I have,
it clearly shows min and max levels for the logical inputs.
What more do you want?
ftp://panteltje.com/pub/pic_io.jpg

This is what I want and what other mfgs provide: A min-max guaranteed
_spec_ for the hysteresis.

Note that this is marked 'preliminary', and is about the 18F14K22 that I just got.
I am pretty sure most of these PICs use the same silicon solution.
There must exist some datasheet for your type of PIC,
This is simply under DC characteristics.


It isn't, see page 263 (attention readers on slow connections, >4MB file):

http://ww1.microchip.com/downloads/en/DeviceDoc/70286C.pdf

All they tell you is in which range your high and low levels must be, no
hysteresis data. When I asked about it they didn't know. In mission
critical apps noise immunity is sort of important and without guaranteed
specs you can't guarantee your design. No dice with me there, that's a
clear red flag for me.
 
J

Joerg

Jan 1, 1970
0
Jan said:
No, that datasheet says: if the level is above .8 * Vdd then it will be a one,
and if below .2 * Vdd it will be a zero.
So you have < .2 * Vdd noise margin from ground and .8 * Vdd noise margin from Vdd.

Unfortunately that is not what such a spec says. It essentially says
that they don't guarantee anything if you are between 0.2*VDD and
0.8*VDD. That has nothing to do with hysteresis. And most definitely not
with noise margin.

From that follows the max noise you can have on the supply line and ground.
I do not see your problem with this spec.


Well, the guy at Microchip saw it but could not help.
 
J

Joerg

Jan 1, 1970
0
Jim said:
Maybe do as others here have done, write an E-mail directly to Steve
Sanghi ?:)

It's been a couple of years since I did some oscillator design work
for them. Some of those people (I believe Don Gerber, for sure) are
still there. Tell me what part and what pin spec is your problem?
I'll ask privately.

It is this controller from their dsPIC series:

DSPIC33FJ256GP710

Main thing is they should write the hysteresis min-max values into the
datasheet like other manufacturers do. And most of all train their
support staff a wee bit :)
 
J

Joerg

Jan 1, 1970
0
Jan said:
No, you do not interpret this right.
It says the input line noise can peak, for a 5V supply,
when input is high, to Vdd .2 x 5 = 1 V below Vdd, so to >4V,
and the noise on the input can peak to < +1 V when at zero.
When noise stays below or above those values, the input will not flip,
and the hysteresis will not happen.

Again, this does _not_ guarantee the input won't switch to low at, say,
1.3V or high at 3.5V. It only says that they don't guarantee it will
switch there but it could (and probably does). It has nothing to do with
hysteresis and noise margin. I bet Jim could elucidate.

Because there is nothing top help, you do not understand the spec.

Then why did they not write back that the hysteresis is 0.2*VDD to
0.8*VDD? One of the reasons is that this would still not specify a
min-max hysteresis. Which you need in order to calculate noise margins
properly.
 
J

Joerg

Jan 1, 1970
0
Jim said:
A quick surf of DSPIC33FJ256GP710, for the data sheet, shows NO
MENTION of hysteresis.

That's the problem, it should, just like the MSP430 datasheets do.

What makes you think there IS hysteresis?

Because it says under "I/O Ports" that they have Schmitt trigger inputs.

A definition of inputs with ZERO <= 0.3*VDD and ONE >= 0.7*VDD is
industry standard.

I was hoping Jan would understand that :)

Microchip is a little more cautious there, with 0.2 and 0.8. But that
does not guarantee that it won't switch at 0.3 or even 0.4.
 
J

Joerg

Jan 1, 1970
0
Jim said:
Jim said:
[snip]
A quick surf of DSPIC33FJ256GP710, for the data sheet, shows NO
MENTION of hysteresis.
That's the problem, it should, just like the MSP430 datasheets do.

What makes you think there IS hysteresis?
Because it says under "I/O Ports" that they have Schmitt trigger inputs.

A definition of inputs with ZERO <= 0.3*VDD and ONE >= 0.7*VDD is
industry standard.
I was hoping Jan would understand that :)

Microchip is a little more cautious there, with 0.2 and 0.8. But that
does not guarantee that it won't switch at 0.3 or even 0.4.

I searched for "hysteresis". Nowhere is that mentioned. I'll ask.

But I'm pretty sure what I'll find is it's simply to clean up slow
inputs.

Usually that's the reason, reduces the "oh s..t, it don't work" support
requests. But if you need it for noise immunity purposes the hysteresis
would have to be known. That's where I must say that TI is a lot more
diligent in their specs. Any old thunderstorm would blow a 50mV
hysteresis aside but not a 500mV one. Right now about half my
assignments are redesigns. Not always fun but it's got to be done.
 
F

Fred Bartoli

Jan 1, 1970
0
Joerg a écrit :
Jim said:
Jim Thompson wrote:
[snip]
A quick surf of DSPIC33FJ256GP710, for the data sheet, shows NO
MENTION of hysteresis.

That's the problem, it should, just like the MSP430 datasheets do.


What makes you think there IS hysteresis?

Because it says under "I/O Ports" that they have Schmitt trigger inputs.


A definition of inputs with ZERO <= 0.3*VDD and ONE >= 0.7*VDD is
industry standard.

I was hoping Jan would understand that :)

Microchip is a little more cautious there, with 0.2 and 0.8. But that
does not guarantee that it won't switch at 0.3 or even 0.4.

I searched for "hysteresis". Nowhere is that mentioned. I'll ask.

But I'm pretty sure what I'll find is it's simply to clean up slow
inputs.

Usually that's the reason, reduces the "oh s..t, it don't work" support
requests. But if you need it for noise immunity purposes the hysteresis
would have to be known. That's where I must say that TI is a lot more
diligent in their specs. Any old thunderstorm would blow a 50mV
hysteresis aside but not a 500mV one. Right now about half my
assignments are redesigns. Not always fun but it's got to be done.

Cute! Where do you get those 500mV lightning? ;-)
 
J

Joerg

Jan 1, 1970
0
Fred said:
Joerg a écrit :
Jim said:
Jim Thompson wrote:
[snip]
A quick surf of DSPIC33FJ256GP710, for the data sheet, shows NO
MENTION of hysteresis.

That's the problem, it should, just like the MSP430 datasheets do.


What makes you think there IS hysteresis?

Because it says under "I/O Ports" that they have Schmitt trigger
inputs.


A definition of inputs with ZERO <= 0.3*VDD and ONE >= 0.7*VDD is
industry standard.

I was hoping Jan would understand that :)

Microchip is a little more cautious there, with 0.2 and 0.8. But
that does not guarantee that it won't switch at 0.3 or even 0.4.

I searched for "hysteresis". Nowhere is that mentioned. I'll ask.

But I'm pretty sure what I'll find is it's simply to clean up slow
inputs.

Usually that's the reason, reduces the "oh s..t, it don't work"
support requests. But if you need it for noise immunity purposes the
hysteresis would have to be known. That's where I must say that TI is
a lot more diligent in their specs. Any old thunderstorm would blow a
50mV hysteresis aside but not a 500mV one. Right now about half my
assignments are redesigns. Not always fun but it's got to be done.

Cute! Where do you get those 500mV lightning? ;-)

It's the SMT version, from 0805-size clouds :)

What I meant is inside a circuit. A properly terminated trace always
picks up some, but not a whole lot. So when you have signals that aren't
terribly fast you can easily get a double pulse and it knocks some
routine off the rocker.
 
J

Joerg

Jan 1, 1970
0
Jim said:
Jim said:
[snip]
Microchip is a little more cautious there, with 0.2 and 0.8. But that
does not guarantee that it won't switch at 0.3 or even 0.4.
I searched for "hysteresis". Nowhere is that mentioned. I'll ask.

But I'm pretty sure what I'll find is it's simply to clean up slow
inputs.
Usually that's the reason, reduces the "oh s..t, it don't work" support
requests. But if you need it for noise immunity purposes the hysteresis
would have to be known. That's where I must say that TI is a lot more
diligent in their specs. Any old thunderstorm would blow a 50mV
hysteresis aside but not a 500mV one.

I'd expect about a VT (or around 0.35V) for this sort of animal.

That would be great.

A lot of my work is fixing the errors/blunders of others.

Same here but it's not errors per se. Mostly just people looking for a
2nd opinion and then optimizing this, that and the other thing. Very
good engineers but it's always best to have folks outside the team
reviewing stuff. If all companies would do that we'd have a lot less in
schedule slips and re-design rounds.

Sometimes it's younger engineers. For example many have never designed a
switch mode converter in their life and the prospect of having to do a
fairly big one right now drives up their neck hair (it should).

Somewhat shocking, I sent a blanket E-mail to about a dozen names I
knew from my Microchip oscillator days. Four of them came back
"unknown" :-(

After only two years? Ouch, that is not so good.
 
J

Joerg

Jan 1, 1970
0
Jan said:
OK, I see your point, you also want a minimum for input low going up,
and a maximum for input high going down.

But the minimum for input low going up is .8 *Vdd,
and the maximum for input high going down is .2 * Vdd
:)
Nothing else is guaranteed here.
Note that that does not exclude the Schmitt trigger effect.
thateffect only means it wil flip over and not come back until the otehr border value is reached.


That's what it doesn't mean, they do not state anything that says it
will not flip until 0.x*VDD.

Say you start at zero with a positive ramp,
it is guaranteed to flip over before you reach 4 V (for 5 V supply),
if you then ramp down, it is guaranteed to flip back before you reach 1 V.
The real flip over points could be 2 and 3 V...
But those have nothing to do with your noise margin, UNLESS you
have noise on the input while it is transitioning to cover both limits.


Aha, now you've got it :)

I would say in such a case you need a better driving circuit..

With a good micro controller you do not. As I showed the MSP430 specs
the hysteresis properly so you can rely on it. You can probably also
rely on it with the dsPIC but they failed to spec it. All one (mostly)
needs in such cases is the minimum hysteresis. The maximum doesn't
matter if you guarantee to get under 0.2*VDD and above 0.8*VDD.

Easy to say "oh just throw in an extra Schmitt up front". But in
consumer goods every penny gets turned around and around.
 
T

Tim Williams

Jan 1, 1970
0
Joerg said:
Blowing off a client with a remark along the lines of "the sales guys will
dig into that if your sales volume is deemed worthy" is, ahem, not a very
polite way to deal with their most important part of biz, the sales
channel.

If you merely told them your name, surely they would recognize your
potential sales? ;-)

I think Joel was alluding more to the fact that, regardless of sales
numbers, the average user needs to be spoon-fed... imagine Microsoft help
lines! They're basically paid to RTFM aloud.

Tim
 
T

Tim Williams

Jan 1, 1970
0
Joerg said:
Sometimes it's younger engineers. For example many have never designed a
switch mode converter in their life and the prospect of having to do a
fairly big one right now drives up their neck hair (it should).

Ha, hire me, it's my hobby ;-)

Tim
 
J

Joerg

Jan 1, 1970
0
Tim said:
If you merely told them your name, surely they would recognize your
potential sales? ;-)

Doesn't work like that nowadays. You must open a support ticket and
enter all that stuff. There are, however, still those "good old day"
companies with nearly unconditional support. Linear Technology,
Supertex, for example. And from my desk they have been richly rewarded
for that with design-ins and subsequent sales. Old American saying: If
you don't support your customer, someone else will.

I think Joel was alluding more to the fact that, regardless of sales
numbers, the average user needs to be spoon-fed... imagine Microsoft help
lines! They're basically paid to RTFM aloud.

But it doesn't take a rocket scientist on their part to see that a claim
is made in a datasheet and the underlying data is clearly missing ;-)
 
J

Joerg

Jan 1, 1970
0
Tim said:
Ha, hire me, it's my hobby ;-)

Seriously, if I needed a hardcore switcher designer I'd probably call
you, after having seen some of your stuff on the web. Not many people
out there who would grab half a pound of ferrite and run it full bore.
 
J

Joerg

Jan 1, 1970
0
Jim said:
Easy to do...

www.analog-innovations.com/SED/Test_Hysteresis.pdf

Slight modification from last month's chip design.

(That enough hysteresis for you, Joerg ?:)

Sweet. I'd love that but I am afraid the dsPIC ain't gonna be that large
in hysteresis. Since I am not a chip designer I can't go in there and
fix it :)

But hey, this year I get to do a high voltage chip. Haven't done one in
over ten years. Well, only architecture and guidance, not the transistor
level stuff (except for some).
 
Top