From: Jan Panteltje on 27 Jan 2010 07:48 On a sunny day (Tue, 26 Jan 2010 15:35:03 -0800) it happened Joerg <invalid(a)invalid.invalid> wrote in <7s9chcFpphU1(a)mid.individual.net>: >> 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. 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. 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 || | - -- ------- | | 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, 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.
From: Joerg on 27 Jan 2010 12:44 Jan Panteltje wrote: > On a sunny day (Tue, 26 Jan 2010 15:35:03 -0800) it happened Joerg > <invalid(a)invalid.invalid> wrote in <7s9chcFpphU1(a)mid.individual.net>: [...] >>> 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. > > 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 :-) -- Regards, Joerg http://www.analogconsultants.com/ "gmail" domain blocked because of excessive spam. Use another domain or send PM.
From: Jim Thompson on 27 Jan 2010 12:59 On Wed, 27 Jan 2010 09:44:23 -0800, Joerg <invalid(a)invalid.invalid> wrote: >Jan Panteltje wrote: >> On a sunny day (Tue, 26 Jan 2010 15:35:03 -0800) it happened Joerg >> <invalid(a)invalid.invalid> wrote in <7s9chcFpphU1(a)mid.individual.net>: > >[...] > >>>> 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. >> >> 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 :-) So far, no response from the E-mail I sent to Microchip :-( 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 ?:-) BTW: The hysteresis can have it's center located anywhere between 0.2*VDD and 0.8*VDD. ...Jim Thompson -- | James E.Thompson, CTO | mens | | Analog Innovations, Inc. | et | | Analog/Mixed-Signal ASIC's and Discrete Systems | manus | | Phoenix, Arizona 85048 Skype: Contacts Only | | | Voice:(480)460-2350 Fax: Available upon request | Brass Rat | | E-mail Icon at http://www.analog-innovations.com | 1962 | I love to cook with wine. Sometimes I even put it in the food.
From: Joerg on 27 Jan 2010 13:07 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. -- Regards, Joerg http://www.analogconsultants.com/ "gmail" domain blocked because of excessive spam. Use another domain or send PM.
From: WangoTango on 27 Jan 2010 13:19
In article <7sbcbtFv25U1(a)mid.individual.net>, invalid(a)invalid.invalid says... > > > 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 :-) A buck less AND it has to work. 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'. |