next up previous
Next: About this document ...

EE 308

68HC12 Cycles

           ldab #10        ; LDAB:   1
    loop:  clra            ; CLRA:   1
           decb            ; DECB:   1
           bne  loop       ; BNE     3/1   (branch/no branch)
           swi             ; SWI     9

Program goes through loop 10 times. First 9 times it branches to loop, last time it does not.

Total number of cycles:

$1 + 9 \times (1 + 1 + 3)+ 1 \times (1 + 1 + 1) + 9 = 58 $

58 cycles = 7.25 $\mu$s



 

Bill Rison
2000-01-28