Firstly delayMicroseconds() doesn't work for large values (known bug), which is why
you are seeing the state change immediately.
Secondly why are you trying to delay for 20ms in an interrupt routine, that would be
locking up the whole system and breaking millis(), micros() and delay() due to missed
timer interrupts?
Interrupt routines should run fast and lean - many things don't work while it
them (such as delay() and serial IO), since interrupts are off.
Set some variables, digitalRead, digitalWrite, analogWrite, that's the sort of thing to do in an interrupt routine - the heavy lifting (and waiting) is for loop().
[ Oh yes, the other thing, you probably don't want to use attachInterrupt on HIGH, try
RISING ]
[ ARGH, sorry, forgot this was DUE forum - is this the Due? Don't know about
delayMicroseconds () on that, it may well work, but the issues of delaying in an
ISR still apply ]
You really never ever want to use HIGH as an interrupt condition on the Due.
If you do the whole system will block while the pin in question is HIGH since the
interrupt status never clears so the ISR runs repeatedly so long as the pin is high.
Furthermore even if the pin is LOW when you first attach the interrupt it runs
once (probably because some status hasn't been properly cleared).
Just using RISING or CHANGE like one normally would.
i need to use attachInterrupt HIGH. my sam3x is connected to a PIC10F204 which controls the board's switching off. when i press the power button for more than 2 seconds the PIC sends an HIGH signal to the SAM and i'm afraid RISING could be triggered from some kind of noise