I am using a PICAXE 08M2 to control each wheel of my robot. I want to count the pulses from my home-brew optical encoder. It is not a real high resolution device. There are only 18 bright/dark transitions and the disc is mounted on the final drive shaft so the revolutions are only in the realm of zero to a few revs per second. Lets say approximately 54 pulses per second - max. Sounds simple enough. I have set an interrupt to occur whenever an input pin goes high. I assume the pin will go high the moment my detector "sees" the leading edge of the bright/reflective strip on the encoder disc and will remain high as long as it takes for the bright strip to pass the detector. I only need to add 1 to a counter, re-set the interrupt and return to the main routine to do other things. Here's my question... How can I avoid popping back into the interrupt routine multiple times during the same pulse? Also, I don't want to just loop in the interrupt routine as long as the input is high - got too much other stuff to do. Any ideas or suggestions would be greatly appreciated.