time need to execute an instruction

Feb 12, 2008 2 Replies

When f=1MHz how much time need exactly to execute a NOP on a PIC16F84 chip? (I think 4us but I am not sure)



Thanks Attila


According to the data sheet:

All instructions are executed within one single instruction cycle, unless a conditional test is true or the program counter is changed as a result of an instruction. In this case, the execution takes two instruction cycles with the second cycle executed as a NOP. One instruction cycle consists of four oscillator periods. Thus, for an oscillator frequency of 4 MHz, the normal instruction execution time is

1 us.

So yes, a NOP takes 4 us.

Yes. Except for branches it is 4 clock cycles per instruction so at 1MHz that would be 4us.

Andrew Smallshaw andrews@sdf.lonestar.org

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required