Led Trái Tim
Led Trái Tim
Led Trái Tim
Main:
CALL CT1
CALL CT3
CALL CT2
JMP Main
;=======================================
CT1: ;Sang Vong;
MOV P0, #00H
MOV P1, #00H
MOV P2, #00H
MOV P3, #00H
MOV A, #00H
L1: SETB C
RLC A
MOV P0, A
CALL Delay
CJNE A, #0FFH, L1
MOV A, #00H
L2: SETB C
RLC A
MOV P1, A
CALL Delay
CJNE A, #0FFH, L2
MOV A, #00H
L3: SETB C
RLC A
MOV P2, A
CALL Delay
CJNE A, #0FFH, L3
MOV A, #00H
L4: SETB C
RLC A
MOV P3, A
CALL Delay
CJNE A, #0FFH, L4
MOV A, #00H
ret
CT2:
mov A, #0feH