0% found this document useful (0 votes)
22 views

Interfacing I/O Ports: Presented By-Preethi S.J

This document discusses input/output (I/O) interfacing techniques between microprocessors and devices. It describes two main techniques: I/O mapped I/O and memory mapped I/O. I/O mapped I/O uses special instructions and direct or indirect addressing of 8-bit or 16-bit I/O ports. Memory mapped I/O treats I/O devices like memory and uses memory instructions to access I/O addresses. Examples are given of interfacing 8-bit and 16-bit input and output ports using both direct addressing with I/O and memory mapped techniques.

Uploaded by

Jayasheel Kumar
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views

Interfacing I/O Ports: Presented By-Preethi S.J

This document discusses input/output (I/O) interfacing techniques between microprocessors and devices. It describes two main techniques: I/O mapped I/O and memory mapped I/O. I/O mapped I/O uses special instructions and direct or indirect addressing of 8-bit or 16-bit I/O ports. Memory mapped I/O treats I/O devices like memory and uses memory instructions to access I/O addresses. Examples are given of interfacing 8-bit and 16-bit input and output ports using both direct addressing with I/O and memory mapped techniques.

Uploaded by

Jayasheel Kumar
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 24

Interfacing I/O Ports

Presented by-Preethi S.J


Data transfer between keyboard and
microprocessor
Data transfer between microprocessor and
display device
I/O Interfacing
Techniques

1.I/O Mapped I/O


2.Memory Mapped I/O
I/O mapped I/O
1. Four special instructions
• IN
• INS
• OUT
• OUTS
2. M/IOI PIN 0
3.Direct addressing & Indirect addressing
4.I/O Address is 8-bits, (direct)
5.I/O Address is 16-bits, (indirect) and address
should be specified in DX register
Presented by-Preethi S.J
I/O mapped I/O instructions

MOV DX,3000H
IN AL,30H IN AL,DX
OUT 30H,AL OUT DX,AL

IN AX,30H MOV DX,3000H


OUT 30H,AX IN AX,DX
OUT DX,AX

DIRECT ADDRESSING INDIRECT ADDRESSING

Presented by-Preethi S.J


Memory mapped I/O
1. Uses 20 address lines
2. IO device is connected as if it is a memory
register
3. Uses memory instructions to access IO device
4. M/IOI PIN is 1

Presented by-Preethi S.J


Interfacing 8-bit input port with address
80H (direct addressing)

IN AL,80H

Presented by-Preethi S.J


Interfacing 16-bit input port with
address 80H (direct addressing)

IN AX,80H

Presented by-Preethi S.J


Interfacing 8-bit output port with
address 82H (direct addressing)

MOV AL,0DA
OUT 82H,AL Presented by-Preethi S.J
Interfacing 16-bit Output port with
address 82H (direct addressing)

Presented by-Preethi S.J


IO interfacing with Memory mapped I/O

Presented by-Preethi S.J


Comparison between Memory mapped IO and
IO mapped IO

Presented by-Preethi S.J


Presented by-Preethi S.J

You might also like