7segment Display (17-155-014) Microprocessors Project
7segment Display (17-155-014) Microprocessors Project
Bonus Simulation
Project
➔
7SEG BCD,KEYPAD PHONE and 8255A circutis in the
simulation
➔
And all device circuits are below ➔
This is the link for short video showing the project in
work.
https://yadi.sk/i/JIeUWcyEZZQnwA
All codes are below
data segment
; add your data here!
task_data db 100 dup(0)
task_id dw 0
PORTA EQU 00H
PORTB EQU 02H
PORTC EQU 04H
PCW EQU 06H
ends
stack segment
dw 128 dup(0)
ends
code segment
start:
; set segment registers:
EELOOP:
;MOV AL,PORTB
IN AL,PORTB
CMP AL,0FEH
JNE NEXT1
MOV AL,001H;
OUT PORTC,AL;
OUT PORTC,AL
JMP GO
NEXT1: CMP AL,0FDH
JNE NEXT2
MOV AL,004H;
OUT PORTC,AL;
OUT PORTC,AL
JMP GO
NEXT2:
CMP AL,0FBH
JNE NEXT3
MOV AL,007H;
OUT PORTC,AL;
OUT PORTC,AL
JMP GO
NEXT3:
CMP AL,0F7H
JNE GO
MOV AL,00BH;
OUT PORTC,AL;
OUT PORTC,AL
GO:
LOOP EELOOP
MOV CX,00FFH
MOV AL,0FDH
MOV DX,PORTA
OUT DX,AL
EELOOP2:
;MOV AL,PORTB
IN AL,PORTB
CMP AL,0FEH
JNE NEXT12
MOV AL,002H;
OUT PORTC,AL;
OUT PORTC,AL
JMP GO2
NEXT12: CMP AL,0FDH
JNE NEXT22
MOV AL,005H;
OUT PORTC,AL;
OUT PORTC,AL
JMP GO2
NEXT22:
CMP AL,0FBH
JNE NEXT32
MOV AL,008H;
OUT PORTC,AL;
OUT PORTC,AL
JMP GO2
NEXT32:
CMP AL,0F7H
JNE GO2
MOV AL,000H;
OUT PORTC,AL;
OUT PORTC,AL
GO2:
LOOP EELOOP2
MOV CX,00FFH
MOV AL,0FBH
MOV DX,PORTA
OUT DX,AL
EELOOP3:
;MOV AL,PORTB
IN AL,PORTB
CMP AL,0FEH
JNE NEXT13
MOV AL,003H;
OUT PORTC,AL;
OUT PORTC,AL
JMP GO3
NEXT13: CMP AL,0FDH
JNE NEXT23
MOV AL,006H;
OUT PORTC,AL;
OUT PORTC,AL
JMP GO3
NEXT23:
CMP AL,0FBH
JNE NEXT33
MOV AL,009H;
OUT PORTC,AL;
OUT PORTC,AL
JMP GO3
NEXT33:
CMP AL,0F7H
JNE GO3
MOV AL,00CH;
OUT PORTC,AL;
OUT PORTC,AL
GO3:
LOOP EELOOP3
JMP BEGIN
JMP BEGIN
end start