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

Find the size of the delay of the code snipped below if the crystal frequency is

ID: 3761224 • Letter: F

Question

Find the size of the delay of the code snipped below if the crystal frequency is 8 MHZ.

                        MYREG         EQU    0x08    ; use location 08 as counter

                        DELAY          MOVLW        0xFF

                                              MOVLW        MYREG

                        AGAIN           NOP

                                               NOP

                                               DECF              MYREG, F

                                               BNZ                AGAIN

                                               RETURN

Explanation / Answer

MYREG         EQU    0x08    ; use location 08 as counter

                        DELAY          MOVLW        0xFF

                                              MOVLW        MYREG

                        AGAIN           NOP

                                               NOP

                                               DECF              MYREG, F

                                               BNZ                AGAIN

                                               RETURN

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