Basic Input and Output Interface - Microprocessors and Computer Systems - Lecture Slides, Slides of Microprocessors

The course is to provide both theoretical background and practical skills in microcomputer (x86) system design. Both hardware and software development (assembly language) and debugging tools are included in the laboratory experiments. Key points in this lecture are: Basic Input and Output Interface, Input-Output Interface, Serial/Parallel Interface, 8255 Programmable Peripheral Interface, Keyboard, 8254 Software-Programmable, Direct Memory Access, 8088 Maximum Mode I/O Interface, Parallel and Se

Typology: Slides

2012/2013

Uploaded on 09/28/2013

noob
noob 🇮🇳

4.4

(25)

105 documents

1 / 83

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Basic Input & Output Interface
docsity.com
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d
pf2e
pf2f
pf30
pf31
pf32
pf33
pf34
pf35
pf36
pf37
pf38
pf39
pf3a
pf3b
pf3c
pf3d
pf3e
pf3f
pf40
pf41
pf42
pf43
pf44
pf45
pf46
pf47
pf48
pf49
pf4a
pf4b
pf4c
pf4d
pf4e
pf4f
pf50
pf51
pf52
pf53

Partial preview of the text

Download Basic Input and Output Interface - Microprocessors and Computer Systems - Lecture Slides and more Slides Microprocessors in PDF only on Docsity!

Basic Input & Output Interface

Outline

a

Input-output Interface

a

Serial/Parallel Interface

a

8255 Programmable Peripheral Interface

a

Keyboard

a

8254 Software-ProgrammableTimer/Counter

I/O interface

a

Input-output involves the transfer to (or from) peripheral devicesfrom (or to) the data bus of the cpu; eg. data transfer to the CRTdisplay, from the keyboard, to/from a hard-disk drive, to/from amodem to another computer system.

a

Input-output operations fall into one of the following types: •^ Programmed I/O

  • cpu polls peripherals to check if I/O is needed -^

Interrupt I/O

  • peripheral sends an interrupt request to cpu for I/O -^

Direct memory access (DMA)

  • peripheral writes directly to memory

a

Considering the address of I/O, 8088 uses Isolated I/O (I/Oaddresses are not part of memory address) as distinct fromMemory mapped I/O (peripherals are mapped to locations in thememory address space).

Q: pros and cons of isolated I/O and memory mapped I/O?

1M
×

Memory

FFFFF^00000
FFFF
64K
×
I/O

(a) Memory + I/O

I/O

FFFFF^00000

(b)

The Memory and I/Omaps for the 8086/8088microprocessor.(a) Isolated I/O.(b) Memory mapped I/O.

Memory and I/O Map

Q: In Isolated I/O, an I/O port has thesame address as one of the memorybyte. How does it know it is beingaddressed?

I/O interface

a

I/O interface functions include •^

data storage buffer for sending and receiving data

-^

low-level communications protocol (handshaking)

-^

data format conversion (eg. parallel/serial)

-^

error detection

-^

addressing of different peripherals

a

I/O interface are typically implemented by LSI (large scaleintegration) - many different types are available from differentmanufacturers.

a

Data can be transferred through I/O interface by eitherprogrammed I/O or interrupt I/O. DMA typically needs a separatecontroller.

8088 maximum mode I/O interface

AIOWC

Bus controller

I/O

interfacecircuitry

I/O device

I/O device

N-

I/O device

A^8
-A

19

AD

-AD 0

7

S^0
-S

2 CLK

ALE DEN

Generalized I/O interface connections to maximum mode 8088

IORCIOWC
R
DT/
M
IO/

Parallel and Serial Data Transfer

(cont.)

a

Serial data transfer involves sending the data on a single line, bitby bit. The I/O interface converts the data from parallel to serial orvice-versa using shift registers.

a

Serial connections are commonly used for data transfer overlonger distances (eg over telephone line). A popular standard forserial data transmission is the RS232C standard.Q: Why serial data transfer is more commonly used in long distance transmission?

Serial I/O

a

Serial I/O can be either(1) Synchronous - data are sent in blocks, with

start

and

end-of-block

markers.

Individual characters within a block do not need start and stop

bits since the receiver identifies every 8 bits as one character, eg.

syn

syn

stx

data field

etx

bcc

pad

one frame

syn = sync character (ascii code 16)stx = start of text (ascii code 02)etx = end of text (ascii code 03)bcc = block check characters (error detection)pad = end of frame pad ( ascii code ff)

Handshaking for I/O

a

Three types of handshaking: •^ Simple parallel I/O - no handshaking implemented •^ Single handshake I/O - uses STB-ACK handshake •^ Double handshake I/O - uses STB-ACK and STB-ACK

data

simple (no handshake)

Handshaking for I/O (cont.)

data

DoubleHandshake

strobeACK

Data transferred after thefirst STB and ACK.

Tx Rx

data

SingleHandshake

strobeACK

: means the circle will trigger theevent pointed by the arrow aftera given time

8255A Programmable Parallel

Port Device

Internal structureblock diagram

GROUP APRRT CUPPERGROUP BPRRT CLOWER GROU BPORT B

(8)

8 BITSINTERNALDATA BUS

Bi-directionalData BusD0-D

DATABUSBUFFER

RDWRA1A RESET

CS

READ/WRITECONTROLLOGIC

PowerSupply

+5VGND

GROUPACONTROL GROUP B CONTROL

GROUP APORTA

(8)

I/O PA7-PA

I/O PC7-PC I/O PC3-PC I/O PB7-PB

8255A Mode 0 Operation

a

In Mode 0 operation, no handshaking will be used.

a

If both port A and port B are initialized as mode 0 operation, port Ccan be used together as an additional 8-bit port, or two 4-bit ports.

a

When used as an outputs, port C line can be set/reset by sendingspecial control word to the

control register address.

a

The two halves of port C are independent and can be set as inputor output port independently.

8255A Mode 1 Operation

a

In Mode 1 operation, single handshaking (strobed) is used.

a

In this mode, some of the port C pins are used for handshakingpurpose.

`

If Port A is set to mode 1 & input port:

PC3, PC4, and PC5 pins are used.

`

If Port A is set to mode 1 & output port: PC3, PC6, and PC7 pins are used.

`

If Port B is set to mode 1 & input port:

PC0, PC1, and PC2 pins are used.

`

If Port B is set to mode 1 & output port: PC0, PC1, and PC2 pins are used.

8255A Mode 1 Operation

MODE 1
PB7-PB
PA7-PA
I/O
I/O
B^8
A
PC
PC
PC
PC
PC
PC
PC
PC
I/O
I/O

A

ACK

OR
OR
I/O
OR I/O
OR
OR
OR
INTR

B^

INTR

A

B

OBF

A

OBF

B

ACK

IBF

B^

IBF

A

PORT A, PORT B CONTROL

INPUT HANDSHAKING

SIGNAL

OUTPUT HANDSHAKING

SIGNAL

INTR

B^

INTR

A

STB

B^

A STB