HW6
HW6
HW6
LOOP:
MOV R5, #4 //first four digits
MOV R4, #1
MOV R3, #0
MOV R2, #7
ACALL UPDATE
LJMP LOOP
UPDATE: //update the 7-segment display
MOV 40H, #10 //use 40H, 41H to set delay time
MEDIUM: MOV 41H, #10
AGAIN:
CLR P2.3 //set first digit
SETB P2.2
SETB P2.1
SETB P2.0
MOV A, R5
MOVC A, @A+DPTR
MOV P1, A
ACALL SHORT
Video:
https://youtube.com/shorts/wlERE0SGwX4?feature=share