PDA

View Full Version : build in schmitt trigger



mischl
- 4th April 2007, 14:32
hello all

the 16f876a for example offers at portc some schmitt trigger inputs instead ttl.
how does they work exactly in consideration to debounce a button? i didn't find an information about the timing, means how long pulses are filtered out.....

thanks for a hint

cheers

skimask
- 4th April 2007, 15:01
I think you might have the wrong idea about schmidt triggers.
Schmidt trigger inputs have a bit of hysteresis built into them, whereas TTL for the most part doesn't.
What this means is that if you've got a slowly varying signal on a TTL pin, as the signal reaches the switch point, the pin will jump back and forth quickly between the logic 0 and logic 1 state. Generally, there isn't a spec'd speed at which it does this. The pin does this as fast as it can, lots of noise, really ugly input.
With that same signal on a pin with a schmidt trigger input and that same slowly varying signal, the input signal has to rise over a threshold before the pin registers a logic level change, then when dropping, that same signal has to drop more below the point at which it switched on the way up... Basically, the schmidt trigger input has some electrical 'slop' built into it.

Think of it this way...
If you've got a heater in your house and you want to maintain 70 degrees, you don't want your furnace kicking in at 69.9999999999 degrees and shutting off at 70.0000000001 degrees. The thing would be turning on and off all day driving you nuts. This is TTL.
If your furnace had a schmidt trigger input, it would turn on when the temp dropped to 68 and shut of when it got to 72 (also called the 'swing' setting on most thermostats).
Check wikipedia for a better explanation.

A button doesn't have a problem with a slowly varying signal. A button has a problem with multiple contacts every time you push it. A schmidt trigger input might help a bit, but it won't solve the problem.

Archangel
- 5th April 2007, 02:20
Hello mischl,
TTL gets a little wishy washy when it's inputs are around 1/2 the supply voltage, it knows 1 volt is logic low and 4 v is logic High, but somewhere in between it gets a little fuzzy and it wants to behave like an analog device. The Schmitt Triggers are there to address that issue so it switches in an all or nothing manner.
JS

mister_e
- 5th April 2007, 14:49
HEY MISCHL :D

To me TTL or Schmitt make no difference as i do the debouncing in software and i don't use extra hardware, the logic level threshold will be different of course, but the software will be the same. For user control, few uSec or mSec shouldn't ruine your life... look your TAS3002 code

Sure i may miss something... getting older today :D

Bruce
- 5th April 2007, 15:05
Happy Birthday Steve...;o}

mister_e
- 5th April 2007, 16:16
Thanks Bruce ;)