8051 LED BLINKER EXAMPLE USING ASSEMBLY
ANOTHER example of led blinker using 8051 microcontroller . it is very easy projects . here i am using the 11.059MHZ crystal oscillator .
CODES;
ORG 00H
MAIN: NOP
MOV P1 , #00H
ACALL DELAY
LOOP: MOV P1 , #0FFH
ACALL DELAY
MOV P1 , #00H
ACALL DELAY
MOV P1 , 0FFH
ACALL DELAY
MOV P1 , #00FH
ACALL DELAY
MOV P1 , #0F0H
ACALL DELAY
MOV P1 , #00FH
ACALL DELAY
MOV P1 , #0F0H
ACALL DELAY
MOV R7 , #07D
MOV A , #01H
MOV P1 , A
ACALL DELAY
HERE: RR A
MOV P1 , A
DJNZ R7 , HERE
NOP
SJMP LOOP
DELAY: MOV R3, #002h
MOV R2, #0ADh
MOV R1, #007h
MOV R0, #0BCh
NOP
DJNZ R0, $
DJNZ R1, $-5
DJNZ R2, $-9
DJNZ R3, $-13
MOV R0, #061h
DJNZ R0, $
NOP
RET
END