My system is interrupt driven, but sometime due to noise signal generates, micro controller treats this signal as an interrupt which is wrong so how can I remove that signal and allow controller to jump in ISR when and only when original interrupt signal will generate. I am using TM4C123GH6PZ controller

  • 3
    \$\begingroup\$ Do you have some schematics or an oscilloscope screen capture to illustrate what you described? \$\endgroup\$ – user59864 Dec 29 '15 at 7:22
  • 3
    \$\begingroup\$ Identify and reduce the noise. Either suppress whatever transmits it, shield the interrupt line, or separate the two of them. \$\endgroup\$ – Brian Drummond Dec 29 '15 at 10:48

Some options:

Option 1, filter out noise with a well calculated series R and shunt C, with values chosen to allow enough current for a sharp enough rise-time based on the device input specs

The effectiveness of an RC circuit will depend on the frequency of the noise you are trying to filter relative to the frequency of the signal of interest. If you are trying to filter out a 100kHz noise source (e.g. a switch mode power supply) from a slow moving logic signal, then it can be done. An RC filter with 100ohm and 100nF would provide some attenuation at this frequency. However, the filter will have a time constant of 100 x 100e-9 = 10e-6 sec, which means it will slow the rise time of your wanted signal down to about 22us (assuming 2.2x time constant for approx 90% rise time). This is probably too slow for an interrupt pin, especially if the signal will contain short pulses.

Option 2, a buffer amplifier or comparator stage prior to the interrupt pin, e.g using an op-amp or schmitt trigger. You can then customise the transition threshold and set it higher to avoid false positives.

Although you haven't said which microcontroller you are using, it is likely that some but not all of the inputs which can be used to generate interrupts will have an internal schmitt trigger (ST) circuit inside the chip. Please make sure you are using one of the inputs which does have a ST. You may have to change some registers to enable the ST. If there isn't one, then it is a good idea to provide an external one.

A combination of option 1 and 2 might be a solution. RC to filter out unwanted noise, and schmitt trigger to sharpen up the transition again. Ferrites can also be used instead of RCs.

  • \$\begingroup\$ This was meant to be a comment. Blasted mobile app \$\endgroup\$ – Mark Ch Dec 29 '15 at 7:49
  • \$\begingroup\$ Thanks for instant reply Mark,I read somewhere to use RC low pass filter, but few things which I don't understand is the relation or significance of Rise time here. Will you please elaborate the design with one example? (Assume any value of noise signal) \$\endgroup\$ – Girish Deshmukh Dec 29 '15 at 8:22

Not the answer you're looking for? Browse other questions tagged or ask your own question.