- #1
nsc
- 4
- 0
Homework Statement
i've just started learning microprocessors, and we need to program the 7-segment LED to display numbers 0-9 in increments of 1
i'm trying to get a delay of 1second between each number (and i couldn't get it)
e.g., number 1 displays for 1 second, then number 2 displays for 1 second
Homework Equations
i kept trying to change the number "9999" into bigger numbers n smaller for [MOV CX,9999]
but can't, so help please!
The Attempt at a Solution
attempt:
START:
MOV DX,0FF13H ;set 8255 mode 0
MOV AL,89H ;set port A mode 0 is output
OUT DX,AL ;set port c mode 0 is input
MOV DX,0FF10H ;output data from port A
MOV AL,00H ;copy data 01h to register AL
J1 : OUT DX,AL ;output data to port A
MOV CX,9999 ;
L1 : LOOP L1 ;time delay
INC AL
DAA
JMP J1 ;jump to label L1