Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Decoupling capacitors

  1. Feb 20, 2005 #1
    Err, another stupid question,

    When the microcontroller chip is connected by 5V DC power supply to input high voltage(Logic 0) for active low input pin, so that when the switch is pressed, a low voltage is input(Logic 1) into the pin, why do we need to connect a capacitor in parallel to the input connections?

    (See the figure in the attached documents.)

    Another question:
    What is the exact function of the MCLR.L pin in the microcontroller as shown in the figure? Does it reset all the programming, or only resetting the outputs to give logic zero at the instant of resetting?

    Attached Files:

    Last edited: Feb 20, 2005
  2. jcsd
  3. Feb 20, 2005 #2
    Most people learn this one the hard way. I do not know the exact physical mechanisms behind this but I have seen its effects many times. If the switch is flipped without the coupling capacitors then the signal will jitter. Meaning that it will jump high then go low then go high. This all happens in a very short amount of time, however they happen long enough that the microcontroller can detect multiple triggers. The coupling capacitor will act as a high pass filter absorbing the jitters and making one smooth transition. This will make sure the micro controller will only trigger once for each flip of the switch. You can also program the micro controller to only register once every mill sec or some thing like that to avoid the problem, but using the coupling capacitor is easier.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook