Led 7 thanh anot chạy từ 0 - 9 và thực hành lắp mạch
Вставка
- Опубліковано 16 вер 2024
- CODE LED 7 THANH :
ORG 0000H ;DANH DAU DIA CHI NGAY SAU NO
ljmp main ;NHAY DAY DEN NHAN" main "
ORG 200H
main:
MOV P2,#40H ; 01000000B ;0
Lcall Wait1s
MOV p2,#79H;01111001B ;1
Lcall Wait1s
MOV P2,#24H;00100100B ;2
Lcall Wait1s
MOV p2,#30H;00110000B ;3
Lcall Wait1s
MOV P2,#19H;00011001B ;4
Lcall Wait1s
MOV p2,#12H;00010010B ;5
Lcall Wait1s
MOV P2,#02H;00000010B ;6
Lcall Wait1s
MOV p2,#78H;01111000B ;7
Lcall Wait1s
MOV P2,#00H;00000000B ;8
Lcall Wait1s
MOV p2,#10H;00010000B ;9
Lcall Wait1s
ljmp main
Wait1s:
Mov R1,#255
Here1:
Mov R2,#255
here2:
Nop
Nop
Nop
Djnz R2,here2
Djnz R1,Here1
Ret
END