0% found this document useful (0 votes)
37 views4 pages

Expt No 8 - 2023

This document describes an experiment to interface an 8086 microprocessor with an 8255 Programmable Peripheral Interface (PPI) chip. The objectives are to draw the interfacing diagram, initialize the Control Word Register to configure the ports, and write assembly programs to output data to the ports and read data from the ports. The 8255 has 3 8-bit ports that can be configured as inputs or outputs using the Control Word Register. The experiment involves writing programs to output data to ports A, B, and C, and to read from port A and output the data to ports B and C.

Uploaded by

Yachika Yadav
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
37 views4 pages

Expt No 8 - 2023

This document describes an experiment to interface an 8086 microprocessor with an 8255 Programmable Peripheral Interface (PPI) chip. The objectives are to draw the interfacing diagram, initialize the Control Word Register to configure the ports, and write assembly programs to output data to the ports and read data from the ports. The 8255 has 3 8-bit ports that can be configured as inputs or outputs using the Control Word Register. The experiment involves writing programs to output data to ports A, B, and C, and to read from port A and output the data to ports B and C.

Uploaded by

Yachika Yadav
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

Expt no.

8: Interfacing 8086 with 8255


Aim: Design a microprocessor-based system to interface 8086microprocessor with 8255
Apparatus / software’s: 8086 kit, 8255 kit, RS232, FRC, HyperTerminal
Objectives: Students will be able
1. To draw interfacing diagram of 8255 and 8086 Microprocessor
2. To interface 8255 with 8086 Microprocessor
3. To initialize CWR for 8255 for various I/O conditions
4. To understand IN and OUT instructions of 8086 microprocessor
Interfacing diagram: (Draw it)

Theory: DYNA – 86L is a general purpose Micro – Computer kit having advanced hardware and software
features. In this experiment, the kit is used in serial mode with baud rate 9600. The 8086 gives command to
8255 to be used in a specific condition.
8255 has three 8 bit ports each of which can be used as an input port or output port. The three ports are
represented by 8 bit LED’s each. The selection is done using the command word register.
Using the CWR, the data to be fed to it is 80H for all ports to be treated as output ports and 9BH for all ports
to be treated as input ports.
The address for ports and CWR is fixed which are to be used with IN and OUT instructions.
Port A= 30, Port B=31, Port C=32 and CWR=33
1. IN − Used to read a byte or word from the provided port to the accumulator.
Eg. OUT 30, AL will move the data from Accumulator to port A, the LED’s will glow accordingly.
2. OUT − Used to send out a byte or word from the accumulator to the provided port.
Eg. IN AL, 31 will get the data of Port B and move it to accumulator.
For treating ports as input ports, the corresponding LED’s where the bit is 0 will be connected to
ground using connector. Eg, for input data 3Ah (0011 1010) of port B the LED’s B.7, B.6, B.2 and
B.0 will be grounded.
Pin configuration:
1. D0 - D7: These are the data input/output lines for the device. All information read from and written
to the 8255 occurs via these 8 data lines.
2. CS (Chip Select Input): If this line is a logical 0, the microprocessor can read and write to the 8255.
3. RD (Read Input): Whenever this input line is a logical 0 and the RD input is a logical 0, the 8255
data outputs are enabled onto the system data bus.
4. WR (Write Input): Whenever this input line is a logical 0 and the CS input is a logical 0, data is
written to the 8255 from the system data bus
5. A0 - A1 (Address Inputs): The logical combination of these two input lines determines which
internal register of the 8255 data is written to or read from.
6. RESET The 8255 is placed into its reset state if this input line is a logical 1. All peripheral ports are
set to the input mode.
7. PA0 - PA7, PB0 - PB7, PC0 - PC7: These signal lines are used as 8-bit I/O ports. They can be
connected to peripheral devices. The 8255 has three 8 bit I/O ports and each one can be connected to
the physical lines of an external device. These lines are labelled PA0-PA7, PB0-PB7, and PC0-PC7.
The groups of the signals are divided into three different I/O ports labelled port A (PA), port B (PB),
and port C (PC).

8255 Operating Modes


1. Mode 0 : Simple I/O
– Any of A, B, CL and CU can be programmed as input or output
2. Mode 1: I/O with Handshake
1. A and B can be used for I/O
2. C provides the handshake signals
3. Mode 2: Bi-directional with handshake
– A is bi-directional with C providing handshake signals
4. B is simple I/O (mode-0) or handshake I/O (mode-1)
5. BSR (Bit Set Reset) Mode
– C alone is available for bit mode access. Allows single bit manipulation for control applications
CWR OF 8255
D7 D6 D5 D4 D3 D2 D1 D0
MODE MODE PORT C
8255 MODE PORT A PORT C UPPER PORT B
SELECTION SELECTION LOWER
00 = MODE 0
1 = I/O 1 = INPUT 1 = INPUT 0 = MODE 0 1 = INPUT 1 = INPUT
01 = MODE 1
0 = BSR 0= OUTPUT 0= OUTPUT 1 = MODE 1 0= OUTPUT 0= OUTPUT
1X = MODE 2

Programme 1:
Interface 8086 microprocessor with 8255 PPI and Write an assembly language programme to out
_____ on Port A, ______ on Port B and ______ on Port C
Control word register
DD DD
743210

1. For all ports as output port:


Address Mnemonics Comments
MOV AL, 80 Load 80H to AL
OUT 33, AL Initialize 8255 for all ports as output ports
MOV AL, ____ Move immediate 8 bit data to AL
OUT 30, AL Move the data to Port A
MOV AL, ____ Move immediate 8 bit data to AL
OUT 31, AL Move the data to Port B
MOV AL, ____ Move immediate 8 bit data to AL
OUT 32, AL Move the data to Port C
INT 3 Interrupt
The corresponding LED’s will glow on 8255 kit
Programme 2:
Interface 8086 microprocessor with 8255 PPI and Write an assembly language programme to read
data from Port A and OUT same data on Port B and Port C
Control word register
D7 D6 D5 D4 D3 D2 D1 D0

2. For all ports as input port:


Address Mnemonics Comments
MOV AL, 90 Load 90H to AL
OUT 33, AL Initialize 8255 for all ports as input ports
IN AL, 30 Take input from Port A to AL
MOV BL, AL Store data in BL
OUT 31, AL OUT the data read from port A to port B
OUT 32,AL OUT the data read from port A to port C
The input data from 8255 will be visible in registers.

Result and Discussion:


Conclusion:

Outcom Performan Attendan Total


PLO 1 PLO 2 PLO 3 E&TC DEPARTMENT- TCET
e ce ce Score

Weight 20 20 20 20 20 100
Date of Performance: _________

Date of Correction: ___________

Roll No: _________


Score

Marks: ______ / 100

Signature of Faculty:

You might also like