Microprocessor Interfacing- Parallel, Serial

Post on 29-Nov-2014

1.148 views 3 download

Transcript of Microprocessor Interfacing- Parallel, Serial

http://tulisnota.blogspot.com/

MICROPROCESSOR INTERFACINGParallel Interfaces, Serial Interfaces

http://tulisnota.blogspot.com/

INTRODUCTION

A of wide range of peripheral devices can be connected to the microprocessor by using serial and parallel interfaces.

This can be done by simply connecting the user’s parallel output port of the transmitting device to the user’s parallel input port of the receiving device.

http://tulisnota.blogspot.com/

INTRODUCTION (CONT.)

Parallel transmission over long distances become expensive since many long wire needed.

Thus data to be sent across a long distance should be sent serially since one line required.

http://tulisnota.blogspot.com/

HANDSHAKING

I/O devices accept or release information at much slower rate than the microprocessor. Handshaking is the method that synchronize the I/O device with microprocessor.

Handshake data transfer use signal between the microprocessor and the peripheral devices for communicating.

http://tulisnota.blogspot.com/

PARALLEL INTERFACE

Types of handshakes in parallel interfacing:1. Single handshake2. Double handshake

http://tulisnota.blogspot.com/

SINGLE HANDSHAKE (PARALLEL)

In single handshake, a peripheral device first sends a "Strobe signal" to the microprocessor to indicate that it is ready to send data.

The microprocessor , upon detecting the strobe signal, opens up its input port and receives the data.

After receiving data, it sends an "Acknowledge signal" to the peripheral to indicate that transmission has been completed.

A transmission session has been completed.

http://tulisnota.blogspot.com/

SINGLE HANDSHAKE (PARALLEL) (CONT.)

Receiver TransmitterData

ACK

STB

DATADATA

http://tulisnota.blogspot.com/

DOUBLE HANDSHAKE (PARALLEL)

In double handshake, first the peripheral device sends a strobe signal, the microprocessor, sends the acknowledge signal to indicate that it is ready to receive data.

After that data is received. After sending data, the peripheral sends a strobe

signal to indicate data transmission completion, due to which, the microprocessor drops its acknowledge signal and a session has been completed.

http://tulisnota.blogspot.com/

DOUBLE HANDSHAKE (PARALLEL) (CONT.)

Receiver TransmitterData

ACK

STB

DATADATA

http://tulisnota.blogspot.com/

SERIAL INTERFACE

Micro-p 8251 USART

RS-232C

Perip

hera

l D

evic

es

http://tulisnota.blogspot.com/

8251 USART

http://tulisnota.blogspot.com/

8251 USART (CONT.)

USART (Universal Synchronous/Asynchronous Receiver Transmitter)

Functions of 8251 USART:1. Serializes the parallel data output by the

processor in the transmitter mode2. Converts the incoming serial data to parallel in

the receiver mode.

http://tulisnota.blogspot.com/

8251 USART (CONT.)

Steps to program 8251 to operate in the synchronous mode:1. Reset the chip2. Write the mode control instruction to the control

port3. Write one or two synchronous characters to the

control port4. Write the command instruction to the control port

http://tulisnota.blogspot.com/

8251 USART (CONT.)

Steps to program 8251 to operate in the asynchronous mode:1. Reset the chip2. Write the mode control instruction to the control

port3. Write the command instruction to the control port

http://tulisnota.blogspot.com/

RS-232C

RS-232C (Recommended Standard 232

Converter)

http://tulisnota.blogspot.com/

RS-232C (CONT.)

http://tulisnota.blogspot.com/

RS-232C (CONT.)

http://tulisnota.blogspot.com/

RS-232C (CONT.)

CPU DEVICES

RS-232C

RS-232C

CABEL

DCE DTE

Note:DCE : Data Communication EquipmentDTE : Data Terminal Equipment

http://tulisnota.blogspot.com/

RS-232C (CONT.)

DATA(RXD)

SIGNAL GROUND(SG)

3 3

7 7

DCE DTE

One Way Communication Note:RXD : Receive Data

http://tulisnota.blogspot.com/

RS-232C (CONT.)

DATA

SIGNAL GROUND(SG)

3 3

7 7

DCE DTE

One Way Communication with Handshaking

HANDSHAKING

HANDSHAKING

(RXD)

(RQS)

(DTR)

4 4

20 20

Note:DTR : Data Terminal ReadyRQS : Request to Send

http://tulisnota.blogspot.com/

RS-232C (CONT.)

DSR

2 2

6 6

DCE DTE

TXD

CTS

SG

5 5

7 7

Transmission from DTE to DCE

Note:TXD : Transmit DataDSR : Data Set ReadyCTS : Clear to Send

http://tulisnota.blogspot.com/

RS-232C (CONT.)

DSR

2 2

6 6

DCE DTE

TXD

CTS

SG

5 5

7 7

Two Way Communication with All Handshaking Connections

3 3RXD

RQS4 4

CD

DTR20 20

2121 RI

8 8

Note:CD : Carrier DetectRI : Ring Indicator