0% found this document useful (0 votes)
10 views5 pages

EEE 3216 Experiment 06

Microprocessor Labsheet
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)
10 views5 pages

EEE 3216 Experiment 06

Microprocessor Labsheet
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/ 5

City University

Department of Electrical and Electronic Engineering (EEE)


Course Code: EEE 3216, Course Title: Microprocessor and Interfacing Laboratory

Experiment No. 06
Name of the Experiment: 8255-A (a programmable I/O device) Interfacing in MDA Win 8086 Board
A. Objectives
The objectives of this experiment are to
 Understand the functionality of the 8255-A Programmable Peripheral Interface (PPI).
 Learn how to configure and utilize the 8255-A for input/output operations.
 Interface the 8255-A with MDA Win 8086 for controlling peripherals.

B. Theory

This inter face allows the user to study the operation of 8255 in 3modes. The Intel 8255
is a general purpose programmable I/O device designed for use with Intel microprocessor
& microcontroller. It has 24 i/o ports, which may be individually programmed in 2
groups i.e., group A consisting of port A(8 pins)& port- C upper(4 pins ) & group- B consisting
of port B (8 pins) 7 port C lower (4 pins) & used in 3 modes of operation.
Mode 0 is called as simple output input mode.
In this mode (MODE O), each group of i/o pins may be programmed in sets of 4 to be
i/p or o/p. that is, port A, port C (upper), port B & port C (lower) may be configured as i/p ports
or o/p ports.
In mode 1, each group is programmed to have 8 lines of i/p or o/p of the remaining 4
pins of port C (lower) , 3 are used for handshaking & interrupt control signals for strobe o/p
operation .
The third mode of operation is a bidirectional bus mode which has 8 lines for a bi-
directional bus 7 & 5 control lines, borrowing one from the other group, for handshaking.
This inter face is designed in such a way that port- A can be used as both i/p & o/p . port
B can be used in o/p mode & port-c can be used as o/p in mode 0 & as control / status in modes
1& 2 .

OPERATION:

MODE 0 (BASIC I/O MODE)

This functional configuration provides simple input and output operations for each of

three ports. PORT-A is the complement of PORT-B.


MODE 1 STROBED INPUT
Control signals used in input operation are STB (Strobe input), IBF (Input buffer full
F/F) & INTR (Interrupt request) and are connected to PORT C bits PC4, PC5 & PC3
respectively.
1
C. Circuit Diagram

D. Apparatus Required

1. 8086 microprocessor kit.


2. 8255 interfacing card.
3. Rs-232.
4. Power supply.
5. 26-pin bus.
6. Talk software.
7. Connecting wires.

E. Program Code:

; EQUATES
PORTA EQU FFC0H ; Port A Address
PORTB EQU FFC2H ; Port B Address
2
PORTC EQU FFC4H ; Port C Address
CTL EQU FFC6H ; Control Port Address

CSEG SEGMENT
ASSUME CS:CSEG
ORG 0000:4000H

; Initialize control port


MOV AL, 80H
MOV DX, CTL
OUT DX, AL

; Stepper motor control sequence


MOV DX, PORTC

MOV AL, 0DH ; Step 1


OUT DX, AL
CALL DELAY

MOV AL, 0EH ; Step 2


OUT DX, AL
CALL DELAY

MOV AL, 06H ; Step 3


OUT DX, AL
CALL DELAY

MOV AL, 07H ; Step 4


OUT DX, AL
CALL DELAY

MOV AL, 03H ; Step 5


OUT DX, AL
CALL DELAY

MOV AL, 0BH ; Step 6


OUT DX, AL
CALL DELAY

MOV AL, 09H ; Step 7


OUT DX, AL
CALL DELAY

HERE: JMP HERE ; Infinite loop

3
; Subroutine for delay
DELAY:
L00: MOV DI, 02H
MOV CX, 0FFFFH
L1: LOOP L1
DEC DI
JNZ L00
RET

CSEG ENDS
END
F. Procedures
1. Connect power supply 5v & GND to both microprocessor trainer kit and programmable
peripheral interfacing kit (card).
2. Make the connections in talk window.
3. Connect data bus between microprocessor trainer kit and programmable peripheral interface
kit.
4. Dump the program in to processor kit using RS-232 cable.
5. Execute the program by typing code segment starting address.
6. Observe the display on interfacing card.

G. Experimental Table
Operation Port Data Sent/Received Observed Behavior

Write to Port A 80H 55H LEDs light up in a pattern

Read from Port B 81H Input switches control LEDs

H. Report

1. Explain the significance of each control word and its role in configuring the 8255-A.
2. Discuss the observed data transfer through Ports A and B.
3. Describe practical applications of the 8255-A in embedded systems.

I. References

1. User’s manual of MDA-8086 microprocessor kit.


2. “Assembly Language Programming and Organization of the IBM
PC” by Ytha Yu and Charles Marut.

You might also like