Saturday, April 30, 2016

8051 Program – led rotation pattern

; led rotation pattern
; led's on port 2
ORG 0H
START: MOV A,#0FEH
MAIN:MOV P2,A
LCALL DELAY
LCALL DELAY
RL A
LJMP MAIN
;some delay
DELAY: MOV R0,#0FFH
LOOP1: MOV R1,#05H
LOOP2: MOV R2,#05H
LOOP3: DJNZ R2,LOOP3
DJNZ R1,LOOP2
DJNZ R0,LOOP1
RET
END



Related topics:
8051 Program - 8bit random number generator   |   8051 Program - 16bit random number generator   |   8051 Program - bit shifting   |   8051 Program - count external interrupt   |   8051 Program - frequency measurement   |   8051 Program - memory subroutines   |   8051 Program - math subroutines   |   8051 Program - conversion subroutines

List of topics: 8051

No comments:

Post a Comment