assembly - correct number of instruction cycles and time? ASM PIC F18 -


can please check if answer correct? :)

the question is:

how long take following subroutine execute if use 12 mhz crystal frequency on f18 pic?

movlw .20 movwf n  again:  decf n,f bnz again nop nop rlncf n,w movwf portc nop return 

my answer is:

22.66 ns 23 ns.

we have 68 instruction cycles, right? , 1 cycle take .33333 ns??

1 / 12000000 hz * 4 = 0.33333 , not 0.33333 ns. right result 22.6666 or 23 us.


Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -