Receiving Pulses on INT0 interrupt Pin on the LPC932

Hi is there anyway of knowing if the LPC is receiving pulses on its INT0 pin. I have it already set up like this:
IT0 = 1; //Pulses are edge detected
EX0 = 1; //interrupt enable bit
EA =1;

It works fine, but is there anyway to find out if the pulses have stopped coming into this pin? The time the pulses will be present at this pin is unknown.
This message is also posted at http://www.8052.com/forum/post.phtml

Parents
  • Presumably you stop getting an interrupt when the pin stops seeing edges?

    How long it has to be after the last edge before you decide that they have "stopped" is up to you. Hopefully you have a known input frequency and can just use a fixed timeout.

    If you've got a timer to spare, you could even start it on each incoming pulse, and have it generate an interrupt some time after the last edge. Otherwise, you might just timestamp the last edge in your interrupt handler, and your main loop can check the last timestamp.

Reply
  • Presumably you stop getting an interrupt when the pin stops seeing edges?

    How long it has to be after the last edge before you decide that they have "stopped" is up to you. Hopefully you have a known input frequency and can just use a fixed timeout.

    If you've got a timer to spare, you could even start it on each incoming pulse, and have it generate an interrupt some time after the last edge. Otherwise, you might just timestamp the last edge in your interrupt handler, and your main loop can check the last timestamp.

Children
More questions in this forum