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

Determine exactly how many instruction cycles the delay loop in the code below (

ID: 2077248 • Letter: D

Question

Determine exactly how many instruction cycles the delay loop in the code below (betweenthe comment lines Begin Delay Loop and End Delay Loop) takes as a function of the variables Count1 and Count2

Maxcount EQU H'0A Equates are good for defining literals CBLOCK H 20 A CBLOCK defines a sequential region Count 1 Count 1 is in location H'20' Count is in location H'21 Count 2 Scratch is in lication H 22' Scratch ENDC ENDO ends the definition block ORG 0x0000 GOTO Init Init ORG 0x0008 BSF STATUS, RPO CLRF TRISB CLRF ANSEL BCF STATUS, RPO Set Scr MOVLW H'01. MOVWF Scratch MainLoop MOVF Scratch, W MOVWF PORTB Begin Delay Loop MOVLW count2 MOVWF Index2

Explanation / Answer

Ans1.

Count1 :-The Remaining of the constants will be assigned to the address after 0*20

Count 2:- The Remaining of the constants will be assigned to the address after 0*21

Ans2.

MOVLW b'00111111'-It will light up 6 LED's to indicate the start of a new rotation

Then in the second line of code it shows the starting of new address

Third line indicates the status of the address

And finally in the fourth line it will set the address on the screen

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