Quote Originally Posted by debutpic View Post
I use one 16F877 MCU to 20 Mhz
TMR1 produce an interrupt every 0,4 µSec
At 4Mhz, each instruction takes 1 uSec to execute.
At 20Mhz, each instruciton takes .2 uSec to execute.
When you take in to account the fact that each jump/return to/from the interrupt handler takes at minimum 4 instructions cycles (2 for the jump into the int handler, 2 for the RETFIE after the handler), which happens to be .8uSec, you have less than ZERO time to do anything.
Even at 40Mhz, you're still at ZERO time left over.
At 48Mhz, you might get one instruction in here and there...
And even at 64Mhz, you probably won't get more than one or two instructions done between interrupts.