Chapter 6 Basic Input and Output Interface
Chapter 6 Basic Input and Output Interface
Output interface
Objective
The operation of buffered input ports
The operation of latched output ports
I/O addressing space
The design of full and partial I/O address
decoders
Basic I/O instruction
Basic data transfer mode
Key terms
• I/O
• Peripheral equipment 外部设备
• Electric level 电平
• Mismatch 不匹配
• Buffer 缓冲器
• Latch 锁存器
• Decoder 译码器
• DMA 存储器直接存取
• Interrupt 中断
• Memory-mapped 存储器映像
• Mechatronics 机电一体化
• Polling 查询
6.1 Introduction
• I/O devices are used to
bring data into CPU
from an external device Microprocessor
such as keyboard or to
send data from CPU to
an external device such
as printer I/O devices Memory
• I/O instructions
• I/O design
Necessity of I/O interface
• Multiplicity in peripherals
• Timing’s mismatching
I/O interface circuit:
medium circuits to link peripherals and CPU
I/O interface circuit
• Programmable interface chip, I/O bus
slots
– Assistant data transfer
– Control logical unit
I/O I/O
CPU Interface
Device
Circuit
6.2 Function of Interface circuits
• 1. Buffer and Latch: Solve the problem of
inconsistency speed.
• 2. Transform information and data:
Convert format and logic level
• 3. Address decoding
• 4. Timing control
6.3 Basic I/O Interface Chips
• Basic Input and Output Interfaces
– A. The basic input device is a set of three-
state buffers.
– B. The basic output device is a set of data
latches.
• Buffered Input chip
– 74LS244, 74LS245
• Latched Output Port
– 74LS373
74LS244
• Two 4-bit buffers
INPUT OUTPUT
1G 1A 1Y
L L L
L H H
H X Z
INPUT OUTPUT
2G 2A 2Y
L L L
L H H
H X Z
74LS245
• Bidirectional bus transceiver
G DIR
L L B Data to A Bus
L H A Data to B bus
H X Isolation
Example
• DEN: Data Enable
• DT/R: Data transmit/receive
74LS373
INPUTS OUTPUT
OC C D Q
L H H H
L H L L
L L x Q0
H x x Z
Example
Review
• Necessity of I/O interface
Acc=AX or AL
cpu I/O
BUS
DMAC
Flowchart of DMA
HLDA
End ?
END
Basic DMA operation
• A. Two control signals are used to request and a
cknowledge a DMA transfer.
• HOLD : input of microprocessor, request a DMA
action
• HLDA : output of microprocessor, acknowledge t
he DMA action.