slide 13 - North South University

Lecture 13
Basic I/O Interface
Presented By
Dr. Shazzad Hosain
Asst. Prof. EECS, NSU
I/O Port Address Decoding
• I/O port address decoding is very similar to
address decoding
• Any I/O device is addressed by a port number
• Reading or writing to an I/O device is to read
or write to that port address
INS Instructions
• INSB – Input String Byte, from I/O device to
memory location
Table 4-14: From Brey’s Book
• Read 50 bytes of data from an I/O device whose address in
03ACH and store the data in LISTS array
Example 4-7: From Brey’s Book
OUTS Instructions
• OUTSB – Output String Byte, from string
memory location to I/O device
Table 4-15: From Brey’s Book
• Transfer data form memory array (ARRAY) to
an I/O device at I/O address 3ACH
Example 4-8: From Brey’s Book
Decoding 8-Bit I/O Addresses
• Decode 8-bit I/O ports F0H – F7H using 74ALS138 decoder
1111 0000 = F0H
1111 0111 = F7H
Decoding 8-Bit I/O Addresses
• Develop an I/O port decoder, using a 74ALS138, for the 8-bit I/O port
addresses 10H, 12H, 14H, 16H, 18H, 1AH, 1CH and 1EH
The Programmable Peripheral Interface (PPI)
• 82C55 is a very popular low-cost
interfacing component found in many
• It sits between microprocessor and the
I/O devices
• It has three ports
– Port A
– Port B
– Port C
• Also has an internal command register
Why Peripheral?
I/O Devices
Interfacing 82C55
• Connect 82C55 so that it functions at 8-bit I/O port addresses C0H (port A), C2H
(port B), C4H (port C), and C6H (command register).
0000 = C0H
0010 = C2H
0100 = C4H
0110 = C6H
Interfacing 82C55
Draw the diagram for interfacing 82C55 for the following addresses 8C (Port A), 9C
(Port B), AC (Port C) and BC (command register).
• Chapter 9 The Intel Microprocessors – by Barry B. Brey

similar documents