Question: Additional problems assigned: 1) For the program below, answer the following questions. a) Determine the time delay in ms in the DELAY subroutine. b) What

 Additional problems assigned: 1) For the program below, answer the following

Additional problems assigned: 1) For the program below, answer the following questions. a) Determine the time delay in ms in the DELAY subroutine. b) What action operation is performed in the loop AGAIN? Assume that the crystal frequency is 8 MHz and the system is using an ATmega32. .ORG 0 LDI R16,HIGH(RAMEND) OUT SPH.R16 LDI R16, LOWRAMEND) OUT SPL,R16 LDI R16,0x40 AGAIN: COM R16 OUT PORTD R16 CALL DELAY RUMP AGAIN DELAY: LDI R19,50 LOOP1: LDI R20,100 LOOP2: LDI R21,200 LOOP3: NOP DEC R21 BRNE LOOP3 DEC R20 BRNE LOOP2 DEC R19 BRNE LOOP1 RET 2) Find the time delay of the following program assuming an oscillator frequency of 4 MHz. Modify the program to achieve the same delay using a nested loop. DELAY: LDI R17, 100 LOOP1: NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP DEC R17 BRNE LOOP1 RET Additional problems assigned: 1) For the program below, answer the following questions. a) Determine the time delay in ms in the DELAY subroutine. b) What action operation is performed in the loop AGAIN? Assume that the crystal frequency is 8 MHz and the system is using an ATmega32. .ORG 0 LDI R16,HIGH(RAMEND) OUT SPH.R16 LDI R16, LOWRAMEND) OUT SPL,R16 LDI R16,0x40 AGAIN: COM R16 OUT PORTD R16 CALL DELAY RUMP AGAIN DELAY: LDI R19,50 LOOP1: LDI R20,100 LOOP2: LDI R21,200 LOOP3: NOP DEC R21 BRNE LOOP3 DEC R20 BRNE LOOP2 DEC R19 BRNE LOOP1 RET 2) Find the time delay of the following program assuming an oscillator frequency of 4 MHz. Modify the program to achieve the same delay using a nested loop. DELAY: LDI R17, 100 LOOP1: NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP DEC R17 BRNE LOOP1 RET

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!