Hi,
I wrote a program to blink an LED for each second. And built solution in avr studio. Then i entered into debugging mode with 'Simulator' tool.
For each 'step in', each program line is executed. Pls see a part of the program.
In debugging mode, after the yellow cursor reach the line "OUT PORTB, R16" (/// Line 1), next it will go to "Delay_1sec" function.
Next, I want to run the delay function in background and reach the "///Line 2" quickly (without entering into delay subroutine). How i can try in avr studio 6.2
My program:
.....
......
Toggle_LED:
IN R16, PORTB
COM R16
OUT PORTB, R16 /// Line 1
RCALL Delay_1sec
IN R16, PORTB /// Line 2
COM R16
OUT PORTB, R16
RJMP Toggle_LED
......
......
Delay_1sec:
LDI R16, 8
Loop1:
LDI R17, 120
Loop2:
LDI R18, 250
Loop3:
NOP
NOP
DEC R18
BRNE Loop3
DEC R17
BRNE Loop2
DEC R16
BRNE Loop1
RET
-
Lenin