Experiment 8
Experiment 8
Submitted by Submitted to
D7 D6 D5 D4 D3 D2 D1 D0
Mode Port-C
1- I/O Mode Port-A
Selection Lower
0- BSR 0 - Input
0 - Mode 0 1 - Input
Mode 1 - Output
1 - Mode 1 0 - Output
➢ BSR Mode: When MSB of the control register is zero (0), 8255 works in Bit Set-
Reset mode.in this only PC bit are used for set and reset.
➢ I/O Mode: When MSB of the control register is one (1), 8255 works in Input-
Output mode.it is further divided into three categories.
➢ Mode 0: In this mode all three ports (PA, PB, PC) can work as simple input
function or output function also in this mode there is no interrupt handling
capabilities.
➢ Mode 1: In this either port A or port B can work and port C bits are used as
Handshake signal before actual data transmission plus it has interrupt handling
capabilities.
➢ Mode 2: In this only port A works and port B can work either in Mode 0 or
Mode 1: and the 6 bits of port C are used as Handshake signal plus it also has
to interrupt handling capability.
➢ Three 8-Bit I/O Ports:
Port A (PA): 8-bit bidirectional port.
Port B (PB): 8-bit bidirectional port.
Port C (PC): 8-bit port with two 4-bit nibbles.
Required Apparatus:
1. MDA8086 Kit.
2. Computer.
Codes:
Task 01: For Blinking bulbs together.
CODE SEGEMNT
ASSUME CS:CODE,DS:CODE
PORTB EQU 1BH
CNTRL EQU 1FH
ORG 1000H START:
MOV AL,10000000B
OUT CNTRL, AL
L1:
MOV AL,00001111B
OUTPUT PORTB, AL
MOV CX, 0FFFFH
LOOP1:
NOP
NOP
NOP
LOOP LOOP1
JMP L1
CODE ENDS
END START
Output:
ORG 1000H
START:
MOV AL,80H
OUT CTRL,AL
L2:
MOV SI,OFFSET DATA
L3:
MOV AL,BYTE PTR DS:[SI]
CMP AL,00H
JE L2
OUT PORTB, AL
CALL DELAY
INC SI
JMP L3
DATA DB 00000001B
DB 00000010B
DB 00001000B
DB 00000100B
DB 00H
Discussion and Conclusion: The experiment of blinking light in using 8255 PPI was
done successfully. In task 01, the LEDs in 8086 kit were blinking together. In task 2,
the LEDs were blinking in clockwise direction. The proper steps were maintain during
the experiment.