Quantcast
Channel: Microcontrollers
Viewing all articles
Browse latest Browse all 4924

Can someone help me with this program

$
0
0
I am trying to display 1 through 9 while rotating on win8051 what am i missing here:

Code:
; Initialize number to display
MOV R1, #0
; Main Loop
LOOP:
; Display R1 on the 7-Segment
CALL GETDIGIT
CALL DISPLAY
; Wait one second
CALL DELAY
; Increment R1
CALL INCREASE
; Repeat the Loop
JMP LOOP
; Delay Function
DELAY: MOV R2, #20h
DELAY1: MOV R3, #0FFh
DELAY2: MOV R4, #0FFh
DELAY3: DJNZ R4,DELAY3
DJNZ R3, DELAY2
DJNZ R2, DELAY1
RET
; Increase Function
INCREASE:
INC R1
MOV A, R1
SUBB A, #10
JNZ...
Can someone help me with this program

Viewing all articles
Browse latest Browse all 4924

Trending Articles