NOP instruction how much time it will take

Thread Starter

sairfan1

Joined May 24, 2012
89
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?
 

BobTPH

Joined Jun 5, 2013
8,104
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.
 
Top