Académique Documents
Professionnel Documents
Culture Documents
Introduction
Read a
character Input/output devices can be interfaced with
from the microprocessor systems in two ways :
Standard
Input Device
1. I/O mapped I/O
Write a 2. Memory mapped I/O
character to
the Standard
Output
Device
1. I/O mapped I/O :
Interfacing
I/O Ports
I/O
Interfacing
Techniques
Solution :
The hardware interface circuit is shown in figure.
The address, control and data lines are assumed to be
readily available at the microprocessor system The
ALP is given as follows :
MOV BL, 00H ; clear BL for status
MOV DX, 0740H ; 16-bit Port address in DX
IN AL,DX ; Read Port 0740H for switch positions.
MOV BL,AL ; Store status of switches from AL into
BL
HLT ; Stop
Problem :
Design an interface of input port 74LS245 to read the
status of switches SW1 to SW8 and output port
74LS373 with 8086. display the number of key that
is pressed with the help of output port on 7 segment
display.
Solution : Status of the switches is first read into the
AL. Displaying the shorted switch number in the 7
segment display. Instead of using 16 address lines,
one may use only A3– A0.