MPMC - UnitIV - Serial Communication and Bus interface-Part-I
MPMC - UnitIV - Serial Communication and Bus interface-Part-I
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
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.
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
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
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
MPMC-N.Ramakrishna 17
RS-232 Level Converters
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
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
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