0% found this document useful (0 votes)
125 views

MPMC - UnitIV - Serial Communication and Bus interface-Part-I

This document discusses serial communication and interfaces. It covers topics like asynchronous vs synchronous communication, baud rate vs bits per second, RS-232 standards including connectors and level converters, and DTE and DCE devices. The key aspects are that serial communication transmits data one bit at a time using a single wire, asynchronous communication uses start and stop bits while synchronous uses clocks, and RS-232 defines voltage levels for serial communication over long distances.

Uploaded by

neha yarrapothu
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
125 views

MPMC - UnitIV - Serial Communication and Bus interface-Part-I

This document discusses serial communication and interfaces. It covers topics like asynchronous vs synchronous communication, baud rate vs bits per second, RS-232 standards including connectors and level converters, and DTE and DCE devices. The key aspects are that serial communication transmits data one bit at a time using a single wire, asynchronous communication uses start and stop bits while synchronous uses clocks, and RS-232 defines voltage levels for serial communication over long distances.

Uploaded by

neha yarrapothu
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 35

Microprocessors and Microcontrollers

Unit IV Part-I
Serial Communication and Bus
Interface
B.Tech, ETM,
IIYear, II Semester
Text : Chapter 11, Microprocessors and
Microcontrollers, Lyla B. Das.
N.RAMAKRISHNA
Dept. of Electronics and Telematics
GNITS, Hyderabad Unit III Part 7 1
3/16/2020
MPMC-N.Ramakrishna
Syllabus
Unit IV
Communication Interface:
 Serial communication standards
 Serial data transfer schemes
 Basics of RS 232

Unit III Part 7 2


MPMC-N.Ramakrishna
3/16/2020
Communication Principles
 Parallel communication :
Number of bits sent together (in parallel)
Example : Data transfer in a computer
 Acceptable when source and destination are near
 Need parallel wires equal to data width (8, 16, 32
bits)

 Solution :
Serial communication

MPMC-N.Ramakrishna 3
Serial Communication Principles
 Serial communication :
Sending digital data one bit at a time,
one after the other.
 8 bits need 8 times the time required for 1 bit
(assuming the same sending rate)
Advantage : only one physical wire is required
for transmission.
 Good when dealing with larger data word sizes.

 Issues need to be dealt with effectively.


MPMC-N.Ramakrishna 4
Simplex, duplex and half duplex
• Simplex
– Data flows only in one direction.
Example :
Transmitter to Receiver
Computer to printer, mouse to computer

 Half Duplex (alternating or semi-duplex)


– Data flows in both directions, full bandwidth
but only one direction at a time.
Example :
Walkie Talkie radio
MPMC-N.Ramakrishna 5
Simplex, duplex and half duplex
 Full Duplex
– Data flows in both directions simultaneously.
- Bandwidth is half
Example :
Telephone, PC serial port

MPMC-N.Ramakrishna 6
Synchronous vs Asynchronous
Communications

http://www.webopedia.com/TERM/S/synchronous.html
MPMC-N.Ramakrishna 7
Synchronous vs Asynchronous
Communications
 Serial data transfer –
Accurate timing needed to differentiate between bits
 The timing can be handled in one of the two ways:
Asynchronous or synchronous
In asynchronous communication, the scope of the timing is a
single byte at the maximum.
 In synchronous communication, the timing scope
comprises one or more blocks of bytes.

MPMC-N.Ramakrishna 8
Asynchronous Communications

 The beginning and end of each byte of data must be


identified by start and stop bits.

 These additional bits cause asynchronous communication


to be slightly slower than the synchronous type.

MPMC-N.Ramakrishna 9
A typical asynchronous character frame

LSB MSB

1 0 1 0 1 1 0 1 1 1 0 1 1 1

1 = idle, mark state ; 0 = start, space state


MPMC-N.Ramakrishna 10
Asynchronous communications
 Idle = 1 (also mark state)
 Start and Stop bits
– Type and number of bits to be identified
for the system
 Parity bit
None, Odd, or Even
Some other error correction/error detection
protocol may be used
 Bit time
Time given for transmission of one bit
 Start bit, data bits with LSB first, parity, Stop bits
MPMC-N.Ramakrishna 11
S.No Asynchronous Synchronous
communication Communication

1 Transmitter and receiver are not Transmitter and receiver are


synchronized by clock synchronized by clock

2 data bits are transmitted at constant rate data bits are transmitted with
synchronization of clock
3 Character may arrive at any rate at receiver Character is received at
constant rate
4 Data transfer is character oriented Data transfer takes place in
blocks

5 Start and stop bits are required to establish Start and stop bits are not
communication of each character required to establish
communication of each
character, however
synchronization bits are
required to transfer the data
block
6 Used in low speed communication at about used in high speed
speed less than 20kbits /sec transmission
MPMC-N.Ramakrishna 12
Transmission Rate
Bits per second – bps
Example :
1200 bps  1200 bits per second sent

Baud rate
Symbols or pulses per second
 For the case of direct serial data transmission
from one computer to another in simple binary form,
the baud rate and bps are the same, but they need
not be the same when modems are used.

MPMC-N.Ramakrishna 13
Computer to computer
communication system using modem

MPMC-N.Ramakrishna 14
Modem

 Modulator - demodulator
 To enable the use of telephone lines or radio signals
to transmit and receive digital data
 Modulation
– Amplitude, frequency, or phase
 Wireless
– FSK, PSK, QAM

MPMC-N.Ramakrishna 15
Baud Rate vs Bps
 Baud rate
Number of times a signal in a communication
channel changes state or varies.
 bps = bauds per second
× the number of bits per baud
 FSK
Each baud transmits one bit
bps = baud rate
 QPSK
Each baud transmits 4 bits
bps = baud rate x 4
MPMC-N.Ramakrishna 16
RS-232 Standards

 This is a serial communications standard


 Before being transmitted,
the TTL voltage levels are changed to a level between
−3 and −25 V for a ‘1’, and
+3 and +25 V for a ‘0’
(the voltages between −3 V and +3 V is undefined).
 This means that before sending,
the bits should be changed to this level and
reconverted to TTL levels on receiving

MPMC-N.Ramakrishna 17
RS-232 Level Converters

 Two common RS-232 Level Converters


1488 RS-232 Driver
1489 RS-232 Receiver.
 Each package contains 4 inverters of one type,
either Drivers or Receivers.

MPMC-N.Ramakrishna 18
Figure 11.3 Serial communication using
RS 232 cable and line drivers/receivers

MPMC-N.Ramakrishna 19
Figure 11.4 MAX 232 chip pin diagram
and a typical connection
Vcc = 5 V

8.5 V
- 8.5 V

All capacitors 1 mF
MPMC-N.Ramakrishna 20
MAX 232 chip converts from TTL to RS 232C levels in one
direction, and from RS 232 C levels to TTL in the opposite
direction. It is used when serial communication at RS 232
standards has to be done. Vcc = 5 V

8.5 V
- 8.5 V

All capacitors 1 mF
MPMC-N.Ramakrishna 21
Figure 11.5 RS 232 connectors

DB-25 male connector DB-9 male connector

MPMC-N.Ramakrishna 22
RS 232 connectors

RS 232 DB9
Male connector

Source : http://www.arcelect.com/rs232.htm
MPMC-N.Ramakrishna 23
RS 232 connectors in a PC

Serial Parallel
Port Port

MPMC-N.Ramakrishna 24
DTE and DCE devices
 DTE – Data Terminal Equipment
Example : computers
Use 25-pin male connectors
 DCE – Data Communication Equipment
Example : modem
Use 25-pin female connectors
 Possible to connect DTE device to DCE device

MPMC-N.Ramakrishna 25
RS 232 connector DB-9

MPMC-N.Ramakrishna 26
RS 232 connector DB-25

Common to DB9 and DB25


MPMC-N.Ramakrishna 27
Figure 11.6 | Typical DTE–DCE connection

MPMC-N.Ramakrishna 28
Figure 11.7 DTE–DTE connection
using a null modem connection

MPMC-N.Ramakrishna 29
DTE-DTE devices connection
 Null modem cable used
 Transmit pin of one connected to
receive pin of another
 Also Transmit and receive signals are crossed
Signals : DTR and DSR, RTS and CTS
 Communication possible with 25 pins, 9 pins or 3 pins
3-pin communication
Transmission and reception done
without handshaking
TxD – Transmitted data, RxD – Received data
MPMC-N.Ramakrishna 30
Fig 11.8 (a): DTE–DCE Connection Using 3 Pins
(b): DTE–DTE Connection with a Null Modem

MPMC-N.Ramakrishna 31
Handshaking signals
in the RS-232 protocol
 Data Terminal Ready (DTR)
 Data Set Ready (DSR)
 Request to Send (RTS)
 Clear to Send (CTS)
 Data Carrier Detect (DCD)
 Ring Indicator (RI)

MPMC-N.Ramakrishna 32
Handshaking signals
in the RS-232 protocol
 Data Terminal Ready (DTR)
After data terminal turned on, self-test done,
sends out DTR signal
Indicates robustness of COM port,
ready for communication
 Data Set Ready (DSR)
DCE turned on, self-test done, sends out DSR
Indicates connection to the network
 DTR and DSR
– Indicate readiness of both DTE and DCE devices
MPMC-N.Ramakrishna 33
Handshaking signals
in the RS-232 protocol
 Request to Send (RTS)
Both devices are ready, DTE has a byte to send,
Asserts RTS signal, received by DCE.
 Clear to Send (CTS)
Receiving equipment responds to RTS with this signal
Indicates that buffer space available for incoming
data
 RTS, CTS – control data flow
If buffer space not available, transmission must wait
until buffer is cleared
MPMC-N.Ramakrishna 34
Handshaking signals
in the RS-232 protocol
 Data Carrier Detect (DCD)
Sent by modem to indicate that valid carrier
has been detected
 Ring Indicator (RI)
Output from modem that telephone is ringing
Modem toggles this line when there is incoming call
 DCD, RI available only in the modem
Rarely used.

MPMC-N.Ramakrishna 35

You might also like