hello ,
i need help to understand how does each instruction fetch decode and execute in 8051 microcontroller
I made small project for LED blinking on proteus software
circuit :
assembly code :
I don't understand how does following instruction fetch , decode and execute ?
how these instructions work with 8051 controller ?
i need help to understand how does each instruction fetch decode and execute in 8051 microcontroller
I made small project for LED blinking on proteus software
circuit :
assembly code :
Code:
ORG 0
MainLoop:
setb P1.0 ; Turn LED ON
Acall Delay ; Wait a short time
clr P1.0 ; Turn LED OFF
Acall Delay ; Wait a short time
sjmp MainLoop ; Loop forever
Delay:
mov R1,#90 ; Set up outer loop count
mov R2,#225 ; Set up inner loop count
Delay1: djnz R2,Delay1 ; Inner loop
djnz R1,Delay1 ; Outer loop
ret
end
Code:
MainLoop:
Acall Delay
sjmp MainLoop