Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

2) Calculate the total delay in LOOP2 including LOOP1 if the clock frequency = 1

ID: 2080454 • Letter: 2

Question

2) Calculate the total delay in LOOP2 including LOOP1 if the clock frequency = 10 MHz. Ignore the difference in the execution of the last cycle of BNZ instruction.

MOVLW               D’60’        

MOVWF               REG11                  ;Set up REG1 for 256 execution

MOVLW               D’60’    

LOOP2: MOVLW               0x64                     ;Load 64H WREG

                              MOVWF               REG10                  ;Set up REG10 as a counter

LOOP1: DECF                     REG10, 1              ;Decrement REG10 – 1W/1C/4CLK

                              NOP                                                    ;Increase delay by 4 CLK

                              BNZ                       LOOP1                  ;Go back to LOOP1 if REG 0 if

                                                                                          ;REG10 is not = 0

                              DECF                     REG11,1               ;Decrement REG11

                              NOP                                                    ;Increase delay

                              NOP                                                   

                              BNZ                       LOOP2                  ;Go back to load REG10 and start

                                                                                          ;LOOP1 again

                              END

Explanation / Answer

10MHz, 2.5 cycles/usec, 9...6,710,886 us, 1...6,710ms

10MHz clocks produce imprecise timing

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote