soulid:
Your code works! Jihaa!I tried several values and found a "base delay" of abput 12.5us meaning that there is no Interupt control below that. From that value on the control works , but I can live with that.
Thank you for your brilliant help!
The digitalWrite() function takes a while and probably explains much of your 12.5 microsecond delay. You can get faster response using direct port access. On the UNO, Pin 13 is PORTB bit 5. (See: Arduino Pins - Google Drive )
To set it HIGH:
PORTB |= 0b00100000;
To set it LOW:
PORTB &= 0b11011111;