unit-2-3
unit-2-3
Input/output – I/O
Interface
to 8086
Presented By
M. Mahesh Babu
Microprocessor-Based Systems
2
Assembly Language
Data bus
Bidirectional
Transfers Binary Data and Instructions
Control lines
Read and Write timing signals
4
Primary function of MPU
Read Instruction from memory
Execute instruction
Read/Write data to memory
Some time send result to output device
LEDs, Monitor, Printer
Interfacing a peripheral
Why: To enable MPU to communicate with I/O
Designing logic circuit H/W for a I/O
Writing instruction (S/W)
Assembly Language Programming
DMA I/O
Polled IO versus Interrupt Driven I/O
Polled IO – processor continually checks IO
device to see if it is ready for data transfer
Inefficient, processor wastes time checking for ready
condition
Interrupt Driven IO – IO device interrupts
processor when it is ready for data transfer
Processor can be doing other tasks while waiting for
last data transfer to complete – very efficient.
Rate of Transmission
For parallel transmission, all of the bits are
sent at once.
For serial transmission, the bits are sent
one at a time. Therefore, there needs to
be agreement on how “long” each bit stays
on the line.
The rate of transmission is usually
measured in bits/second or baud.
Prepared by M. Mahesh Babu Assistan
t-Professor.
Given a certain baud rate, how long
should each bit last?
Baud = bits / second.
Seconds / bits = 1 /baud.
At 1200 baud, a bit lasts 1/1200 = 0.83 m
Sec.
0 0 1 port B
0 1 0 port C
0 1 1 Control
Register
1 X X 8255 is
disabled
11-57
Basic Mode Definitions and Bus
Int
Mode 0
Basic I/O
Mode 1
Strobe I/O
Mode 2
Bi-Dir Bus
8255 PPI Mode selection:
There are 3 basic modes of operation that can
be selected by the system software for the
8255:
Mode 0 - Basic Input/Output
Mode 1 – Input/output with Handshake (Strobed
I/O)
Mode 2 - Bidirectional Data Transfer