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

time need to execute an instruction
Started by ●February 12, 2008
Reply by ●February 12, 20082008-02-12
John Smith wrote:> When f=1MHz how much time need exactly to execute a NOP on a PIC16F84 chip? > (I think 4us but I am not sure)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.
Reply by ●February 12, 20082008-02-12
On 2008-02-12, John Smith <john.smith@hotmail.com> wrote:> When f=1MHz how much time need exactly to execute a NOP on a PIC16F84 chip? > (I think 4us but I am not sure)Yes. Except for branches it is 4 clock cycles per instruction so at 1MHz that would be 4us. -- Andrew Smallshaw andrews@sdf.lonestar.org
