Exp 2 - MDA 8086
Exp 2 - MDA 8086
Connection Diagram:
Page 1 of 3
8255
Page 2 of 3
Figure 2: LED Connection
Page 3 of 3
Control Word for LED Interfacing:
D7 D6 D5 D4 D3 D2 D1 D0 Control
word
Page 4 of 3
Instructions/Program:
CODE SEGMENT
ASSUME CS:CODE,DS:CODE,ES:CODE,SS:CODE
;
PPIC_C EQU 1FH
PPIC EQU 1DH
PPIB EQU 1BH
PPIA EQU 19H
;
ORG 1000H
MOV AL,10000000B
OUT PPIC_C,AL
;
L1: MOV AL,00000001B
OUT PPIB,AL
CALL DELAY
MOV AL,00000000B
OUT PPIB,AL
CALL DELAY
JMP L1
DELAY: MOV CX,1111111111111111B
TIMER1: NOP
NOP
NOP
NOP
LOOP TIMER1
RET ;
CODE ENDS
END
Experiment Procedures:
Page 5 of 3
Home Work:
1. Create a new code where all the LEDs will turn on at the same time and after a while all
the LEDs will turn off.
2. Create a code where LEDs one and two are on while LED three and LED four are off and after
a while LED three and four are on while LED one and two are off.
Reference Book:
Assembly Language programming and Organization of the IBM PC
By Ytha Yu and Charles Marut
Page 6 of 3