You are on page 1of 27

Computer interfacing

Lecture 11
Parallel versus serial data transmission…
Parallel Data Transmission Serial Data Transmission
 N bit at a time transmission.  bit by bit transmission.
 More transfer lines.  less transfer lines.
 Short -distance communication  long-distance communication
 Fast, but expensive  Slow comparatively, but less expensive
Bit Rate Comparison
Serial Communication…

• Asynchronous serial communication


• Synchronous serial communication
Asynchronous serial communication…
 A form of serial communication in which the
communicating endpoints' interfaces are not
continuously synchronized by a common clock
signal.

 Transmitter and Receiver operate


independently
 Transmitter sends data at any time
 Receiver is ready to accept data at all times
Asynchronous serial communication…

 Instead of a common synchronization signal,


the data stream contains synchronization
information in form of start and stop signals,
before and after each unit of transmission,
respectively.
 The start signal prepares the receiver for
arrival of data and the stop signal resets its
state to enable triggering of a new sequence.
Synchronous serial communication
 Data is sent in a continuous stream at a constant rate
 Synchronous communication requires that the clocks in the
transmitting and receiving devices are synchronized –
running at the same rate
 receiver can sample the signal at the same time intervals
used by the transmitter.
 No start or stop bits are required. So, synchronous
communication permits more information to be passed over
a circuit per unit time  than asynchronous serial
communication.
 Over time the transmitting and receiving clocks will tend to
drift apart, requiring resynchronization.
Serial Ports
Is a serial
communication interface
through which information
transfers in or out one bit at a
time.

9-pin and 25-pin serial connectors


Serial ports

 Serial ports are still used in applications such as:


 industrial automation systems,
 scientific instruments, 
 point of sale systems and some industrial and consumer products. 
 Server computers may use a serial port as a control console for diagnostics.
 Network equipment (such as routers and switches) often use serial console
for configuration.

 Serial ports are still used in these areas as they are simple,
 cheap and their console functions are highly standardized and widespread.
 A serial port requires very little supporting software from the host system.
Serial ports
Newer type of serial connections:
– Universal Serial Bus (USB)
– IEEE 1394 serial connection that is also known as
the FireWire connection
Universal asynchronous
receiver/transmitter [UART]
 Used to transfer data between serial and parallel
forms
 UART takes bytes of data and transmits the
individual bits in a sequential fashion.
  At the destination, a second UART re-assembles
the bits into complete bytes.
 Each UART contains a shift register, which is the
fundamental method of conversion between serial
and parallel forms
Universal asynchronous
receiver/transmitter [UART]

sender receiver

UART UART
[PISO Serial

Byte
Serial SIPO
Byte

shift port port shift


register] register
What is RS-232?????
• Is a standard by which two serial devices
communicate.
• RS-232 is an asynchronous form of
communication.
• The first serial standard interface developed by
1960.
• RS422, RS449 are its successors characterized by
higher data rate, and longer transmission
distances.
RS-232 standard
Logical Voltages:
 Logical 1 is represented by –15VDC.
 Logical 0 is represented by +15VDC.
 When the connection is idle, the hardware ties the
connection to logical 1.
Sending a character over RS-232
Every time a character is sent, the same
communication occurs:

1. Start bit sent.


2. Seven data bits sent.
3. Stop bit sent.
Data Format
 Start bit– is a logical 0 sent on the line
indicating the beginning of word.
 Data bit– data user is transmitting.
 Parity bit– checks integrity of data.
 Stop bit– is a logical 1 sent on the line
indicating the end of word.
A Sample Transmission
• Idle 1
• Start bit 0
• Data bit 0 or 1
• Parity 0 or 1
• Stop bit 1
Parity
 Method of detecting errors in transmission.

 An extra data bit is sent with each data character, arranged


so that the number of 1 bits in each character, including the
parity bit, is always odd or always even.

 If a byte is received with the wrong number of 1s, then it


must have been corrupted.

 However, an even number of errors can pass the parity


check.
Parity…..
 Even Parity
– Parity bit is set to 1 when the number of 1 bits is
an odd number (when including the parity bit, is
then even)
 Odd Parity
– Parity bit is set to 1 when the number of 1 bits is
even (when including the parity bit, is then odd)
Parity

• Example – Even Parity


– 0101010101 4 1’s in data  0

Stop Bit
Data
Start Bit Parity Bit
Baud rate
The transmission rate of serial devices is called
baud. It is the number of changes in the signal
per second….
Baud rate
 Bit rate (bits/sec): actual rate at which bits are
transmitted.
 Baud rate: rate at which the signaling
elements, used to represent bits, are
transmitted.
Since one signaling element encodes one bit, both
rates are identical.
 Time period of each bit = 1/baud rate seconds
Baud rate
• In digital systems with binary code, 1 Bd = 1
bit/s.
• By contrast, non-digital (analog) systems use a
continuous range of values to represent
information and in these systems the exact
informational size of 1 Bd varies.
Baud rate
• The baud is scaled using standard metric
prefixes, so that for example:
– 1 kBd (kilobaud) = 1000 Bd
– 1 MBd (megabaud) = 1000 kBd
– 1 GBd (gigabaud) = 1000 MBd.
Wiring RS-232
• The RS-232 specification denotes usage of a 25 pin
cable, where each pin has a specific usage.
• However, most devices never need to use all of the
pins, so the cabling requirements for specific devices
may vary.
• Many common serial devices (modems for example),
use a 9 pin serial connection.
RS-232 DB25 Pin Out

DB-25M Function Abbreviation


Pin #1 Chassis/Frame Ground GND
Pin #2 Transmitted Data TD
Pin #3 Receive Data RD
Pin #4 Request To Send RTS
Pin #5 Clear To Send CTS
Pin #6 Data Set Ready DSR
Pin #7 Signal Ground GND
Pin #8 Data Carrier Detect DCD or CD
Pin #9 Transmit + (Current Loop) TD+
Pin #11 Transmit - (Current Loop) TD-
Pin #18 Receive + (Current Loop) RD+
Pin #20 Data Terminal Ready DTR
Pin #22 Ring Indicator RI
Pin #25 Receive - (Current Loop) RD-
RS-232 DB9 Pin Out

DB-9M Function Abbreviation


Pin #1 Data Carrier Detect CD
Pin #2 Receive Data RD or RX or RXD
Pin #3 Transmitted Data TD or TX or TXD
Pin #4 Data Terminal Ready DTR
Pin #5 Signal Ground GND
Pin #6 Data Set Ready DSR
Pin #7 Request To Send RTS
Pin #8 Clear To Send CTS
Pin #9 Ring Indicator RI

You might also like