detect falling object with infra red (urgent)

clankill3r:
What is ISR? First i thought it was a typing error for IR.

It's a function that gets run when an "interrupt" happens. An interrupt is usually triggered by a pin change or a timer (in your case, it would be a pin change), and it just pauses whatever the code is currently doing and calls the function, then goes back to whatever it was doing.

I'm also questioning how you managed to get a good digitalread value on an analog signal, but that's great if it works.

I think when using digital read on a analog signal that below 512 is 0 and above 512 is 1 (that's my guess).

Nope. Generally, it will read HIGH if it's above about 2.7V, LOW if it's under about 0.3V, and whatever it wants between the two. For speed, I'd suggest getting something like an analog comparator that can take an analog signal and say "under" or "over" for a certain voltage.

I will look at direct port acces.

That will have the same problems as I just mentioned, but it will be faster. However, if the digitalRead'ing works somehow, direct port access will also.