This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Edge level triggered interrupt picking noise

Hi, in my application i am using one of the I/O as a edge level triggered interrupt.  and it looks for positive edge of square wave.

Now in my circuit a noise causes  1 square wave pulse which causes false triggering of interrupt. 

if anyone have software fix for this let me know

 

Thanks

  • Activate the internal pull-up or pull-down resistor for the I/O pin that is used as an edge interrupt pin. It may help.

  • Thanks.

    I tried this option still didnt work though.

  • abhishek Sabnis said:
    Now in my circuit a noise causes  1 square wave pulse which causes false triggering of interrupt. 

    This doesn't really tell the problem.

    What is the signal you're expecting/want to detect and what is the signal you're getting that causes the problem?
    A drawing is better than 1000 words. :)

  • 7563.1.doc

    Thanks Jens.

    I have attached the file. Fig 1 is showing the noise i am getting on  i/o pin P1.2 which is configured for  Edge-level triggering. During this event signal is not present but due to circuit noise it appears to be  present.

    Fig 2 shows The wavefrom of  P1.2 when signal is present.  

    Now due to edge level triggering micro assumes it as a true signal (AS shown in fig 2) when its just the noise.

    I want to know can i do sampling on edge level triggering and how. something like 10 samples to judge whether its true signal or not.

  • Hmmm, do I get it right: you want to synchronize with the beginning of a pulse, but only if it is a pulse in a row of pulses and not if it is a single pulse?

    Or do you want to eliminate the noise inside the single pulse if you generate it with the test switch?

    For eliminatign the noise inside the pulse, use teh debouncing techniques discussed in several othe rthreads. Basically, on the first edge start a timer and disable the port interrupt, and when the tiemr expires, check the port pin whether it still is an active signal and re-enable the por tinterrupt. You will, however, 'recognize' teh rising edge then with a delay - the delay of the timer.

    You can use some external electronics to smoothen youer signal. Filter capacitors etc.

    If you just want to eliminate a single pulse and only react if it is a chain of pulses, you can keep track of the time passed between this oen and the last rising edge. If the dela is too long, it is not a 'signal', and if it is too short, it is bouncing/noise and can be ignored.
    However, a 'no signal' edge xan be the first pulse of the signal too. You simply cannot look into the future.

    It's always easy to look at a scope printout and say 'it's obvious'. For the MSP who has to check this in realtime without knowing what will come, it isn't obvious at all, and sometimes it is impossible.

**Attention** This is a public forum