Question: For AVR ATMEGA32 1) For the program below, answer the following questions. a) Determine the time delay in ms in the DELAY subroutine. b) What
For AVR ATMEGA32
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 8MHz and the system is using an ATmega32. .ORG 0 LDI R16,HIGH(RAMEND) OUT SPH,R16 LDI R16, LOW(RAMEND) OUT SPL,R16 LDI R16,0x40 AGAIN: COM R16 OUT PORTD,R16 CALL DELAY RJMP AGAIN DELAY: LDI R19,50 LOOP1: LDI R20,100 LOOP2: LDI R21,200 LOOP3: NOP DEC R 21 BRNE LOOP3 DEC R20 BRNE LOOP2 DEC R19 BRNE LOOP1 RET
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
