Microprocessor Interfacing- Parallel, Serial

22
http://tulisnota.blogspot.com/ MICROPROCESSOR INTERFACING Parallel Interfaces, Serial Interfaces

Transcript of Microprocessor Interfacing- Parallel, Serial

Page 1: Microprocessor Interfacing- Parallel, Serial

http://tulisnota.blogspot.com/

MICROPROCESSOR INTERFACINGParallel Interfaces, Serial Interfaces

Page 2: Microprocessor Interfacing- Parallel, Serial

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.

Page 3: Microprocessor Interfacing- Parallel, Serial

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.

Page 4: Microprocessor Interfacing- Parallel, Serial

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.

Page 5: Microprocessor Interfacing- Parallel, Serial

http://tulisnota.blogspot.com/

PARALLEL INTERFACE

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

Page 6: Microprocessor Interfacing- Parallel, Serial

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.

Page 7: Microprocessor Interfacing- Parallel, Serial

http://tulisnota.blogspot.com/

SINGLE HANDSHAKE (PARALLEL) (CONT.)

Receiver TransmitterData

ACK

STB

DATADATA

Page 8: Microprocessor Interfacing- Parallel, Serial

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.

Page 9: Microprocessor Interfacing- Parallel, Serial

http://tulisnota.blogspot.com/

DOUBLE HANDSHAKE (PARALLEL) (CONT.)

Receiver TransmitterData

ACK

STB

DATADATA

Page 10: Microprocessor Interfacing- Parallel, Serial

http://tulisnota.blogspot.com/

SERIAL INTERFACE

Micro-p 8251 USART

RS-232C

Perip

hera

l D

evic

es

Page 11: Microprocessor Interfacing- Parallel, Serial

http://tulisnota.blogspot.com/

8251 USART

Page 12: Microprocessor Interfacing- Parallel, Serial

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.

Page 13: Microprocessor Interfacing- Parallel, Serial

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

Page 14: Microprocessor Interfacing- Parallel, Serial

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

Page 15: Microprocessor Interfacing- Parallel, Serial

http://tulisnota.blogspot.com/

RS-232C

RS-232C (Recommended Standard 232

Converter)

Page 16: Microprocessor Interfacing- Parallel, Serial

http://tulisnota.blogspot.com/

RS-232C (CONT.)

Page 17: Microprocessor Interfacing- Parallel, Serial

http://tulisnota.blogspot.com/

RS-232C (CONT.)

Page 18: Microprocessor Interfacing- Parallel, Serial

http://tulisnota.blogspot.com/

RS-232C (CONT.)

CPU DEVICES

RS-232C

RS-232C

CABEL

DCE DTE

Note:DCE : Data Communication EquipmentDTE : Data Terminal Equipment

Page 19: Microprocessor Interfacing- Parallel, Serial

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

Page 20: Microprocessor Interfacing- Parallel, Serial

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

Page 21: Microprocessor Interfacing- Parallel, Serial

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

Page 22: Microprocessor Interfacing- Parallel, Serial

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