Hysteresis on dsPIC ports?

J

Joerg

Jan 1, 1970
0
Jan said:
On a sunny day (Tue, 26 Jan 2010 15:35:03 -0800) it happened Joerg
[...]
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.

No no, I dunno how much you know about micros, but a few points I want to mention here:
1) When an input changes, its is sampled by the micro at some edge of its *own* clock.

Not if it's an interrupt :)

That means if you have a lousy signal, say a lot of RF noise on a rising edge, like this:


.
.
.
.
. .
.. . ------------- slice level
. ..
.



- ----
|| |
|| | ------- micro internal Schmitt output
|| |
- --

I want this :)

----
|
|
|
-------

-------
|
| micro clock
______

^
|
data is sampled here, and a '1' is read.



So the input is sampled either low or high, if it sampled low because its sampled just in the low part of the RF,
then it will sample high on the next micro clock, just a one clock delay.

I think, the reason, possibly the ONLY reason, for the Schmitt trigger in that input, is to avoid 'metastability'.
Now metastability is a whole an other subject, and whole threads have been written on it in comp.arch.fpga, look it up.
But it basically is related to the gates operating in their linear range, and the Schmitt trigger really prevents that,

Mostly the problem is sluggish inputs or stray noise from nearby
thunderstorms. A lightning-induced spectrum concentrates in the hundreds
of kHz range and that can produce a lot of grief in a uC. Some of the
stuff I deal with is also deployed in the "Tornado Alley", Carribean
etc. If you know engineers from the Dutch Antilles they can probably
tell you about that.
Now on the subject of noise, I have learned that interfacing microns in an industrial environment requires
*always* special precautions.
I use opto couplers myself always, simply because that
1) gets rid of ground loops.
2) allows for a wide range of input voltages, say you get something from a 24 V system, or 48 V, or even 230 V.
3) you can likely use the micros internal pullups at the input.
4) Very high frequency RF does not make it through an optocoupler.
5) no capacitive coupling to speak of either.
etc etc.
So, be smart, and use those.


It ain't so easy in price-sensitive gear (consumer and so on) where
every penny counts. If you can make it happen with a buck less than the
other guy your client wins :)
 
J

Joerg

Jan 1, 1970
0
Jim Thompson wrote:

[...]
So far, no response from the E-mail I sent to Microchip :-(

Not too surprising. Thanks for sending the email.

Foundries are a lot more responsive. For one of them I sent the NDA
yesterday afternoon and during the night they tossed me the keys to the
process data. Plus they are processing some sort of design kit order,
whatever than means. Another one immediately scheduled a conference call
for early this afternoon. Now that's customer service.

Looking at some old Atmel stuff that was purely digital, it should be
about 300mV with a 3.3V supply.

Can't you test it ?:)

Yes but the hardware is currently 1500 miles from here. However, that
won't help too much because I need to know the guaranteed minimum
hysteresis.

BTW: The hysteresis can have it's center located anywhere between
0.2*VDD and 0.8*VDD.

That would be no problem.
 
J

Joerg

Jan 1, 1970
0
WangoTango said:
A buck less AND it has to work.


It will.

Is what you are working on going to be produced in such vast numbers
that 25 cents here or there is going to be the difference between making
or breaking the profit margin?
I find that a reliable product is a lot easier to sell than one that is
just 'cheap'.

This one just has to be small. I can make uC products work very reliably
without fancy circuitry around them, have done it many times. _If_ the
uC is properly characterized, which this one is not. I would not have
picked it but was already in there.
 
J

Joerg

Jan 1, 1970
0
Joel said:
What's the cost of fixing the many flaky internal power-on reset
circuits that you've seen many of? :)

In terms of components? Well under 50c, even in IC form. These little
dudes are quite nice at around 15c a pop in qties:

http://www.onsemi.com/pub_link/Collateral/NCP302-D.PDF

The cost to the business before the fix? Huge. Because it often results
in a service call, or a truck roll in utility speak.
 
J

Joerg

Jan 1, 1970
0
Jim said:
Jim Thompson wrote:

[...]
So far, no response from the E-mail I sent to Microchip :-(
Not too surprising. Thanks for sending the email.

Foundries are a lot more responsive. For one of them I sent the NDA
yesterday afternoon and during the night they tossed me the keys to the
process data. Plus they are processing some sort of design kit order,
whatever than means. Another one immediately scheduled a conference call
for early this afternoon. Now that's customer service.

Looking at some old Atmel stuff that was purely digital, it should be
about 300mV with a 3.3V supply.

Can't you test it ?:)
Yes but the hardware is currently 1500 miles from here. However, that
won't help too much because I need to know the guaranteed minimum
hysteresis.

BTW: The hysteresis can have it's center located anywhere between
0.2*VDD and 0.8*VDD.
That would be no problem.

They've probably never measured it, just inserted a library part ;-)

You _do_ know that you can safely put an R/C in front of a Schmitt
input to get rid of large HF noise?

Yes, but there comes a point where you introduce too much external
latency when doing that.

I came up with that VT/VBE from rail hysteresis gimmick (posted
earlier today) during my ignition pick-up days... around 40 years
ago... rejects even severe spark noise ;-)

My last ignition thingie was end of last year. But it's for a flying
apparatus and not cars :)
 
J

Joerg

Jan 1, 1970
0
Jim said:
Done right, it's quite a bit of circuitry. One I did recently, that
tested 3 supplies plus had a delay after voltages were AOK, was close
to 15% of the active chip area :-(

Get the library for the NCP30x from ON Semi? Don't you have good
connections to them?
 
J

Joerg

Jan 1, 1970
0
WangoTango said:
We go through a truck load of DS1233s every year.
Recently we had an assembler swap out the DS1233-15 for an MCP130-15
because their supplier told them it was a "drop in replacement", well,
it isn't, and now we are dealing with a big retrofit of stocked units
and some made it out into the field.


I wonder why they call the DS1233 "Econo Reset" when it it so much more
expensive. But that mfg is on my no-traffic list anyhow.

... Testing didn't stop to look at the
part until a few units failed on the jig, and by then it was too late.
Enough had passed to get out into the wild. Lesson learned, the hard
way as usual. To top it off, he got his hands on some
pulled/refurbished battery backed RAM that looks like Mr Haney from
Green Aces worked it over for resale. All of that crap was immediately
rejected.


Ouch. I bet someone was read the riot act later ;-)
 
J

JosephKK

Jan 1, 1970
0
We go through a truck load of DS1233s every year.
Recently we had an assembler swap out the DS1233-15 for an MCP130-15
because their supplier told them it was a "drop in replacement", well,
it isn't, and now we are dealing with a big retrofit of stocked units
and some made it out into the field. Testing didn't stop to look at the
part until a few units failed on the jig, and by then it was too late.
Enough had passed to get out into the wild. Lesson learned, the hard
way as usual. To top it off, he got his hands on some
pulled/refurbished battery backed RAM that looks like Mr Haney from
Green Aces worked it over for resale. All of that crap was immediately
rejected.

It is not good when an assembler gets that far out of control. I would
say that some unpaid vacation seems to be called for.
 
J

JosephKK

Jan 1, 1970
0
That is EXACTLY what has happened.
Long story short, this makes 3 incidents with this assembler in 1 year.
One is a mistake, 3 is a company policy.
I usually go by the 'ol "Never attribute to malice, what can be
explained by stupidity", but this is nuts. I would rather hire another
person for in house employment than send them another nickle.
To say I was pissed off would be the understatement of the year.

Wow. Like, time to "find another client". That whole house is a mess.
But, your situation is your situation and "finding another client" may
not be reasonable for you.
 
Top