NOP instruction how much time it will take

Thread Starter


Joined May 24, 2012
I'm writting some code for PIC uC using XC compiler, we can use macro NOP() for an empty instruction to execute, I believe it will take one cycle?
if uC is configured with 4Mhz clock how can I calculate duration that NOP instruction may take?


Joined Jun 5, 2013
It is really simple. When you invert a frequency in Hz, the answer is in seconds. When you invert a frequency in MHz the answer is in 1/1,000,000th seconds, or microseconds. Nanoseconds would pair with GHz.