Hi I am using ultra sonic sensors to detect any obstacle and i have connected their response to extenal interrupt0 of 8051. The problem is the sensors are very sensitive they trigger the interrupt even if there is an object very far. I want that external interrupt should trigger if it gets contineous pulse from sensors for 1 second. (I think it is called debounce operation). Is their any way i can do this. Thanks for your help
You could use a timer to generate a regular interrupt at a suitable frequency (say 100Hz) and poll the input from your sensor in the timer interrupt service routine. If the input is active for 100 consecutive polls you would be pretty sure you were seeing a real object rather than noise.
THanks for your reply i have solved my problem with this timer technique.