0% found this document useful (0 votes)
119 views19 pages

Serial Interface

Serial ports allow computers to communicate with external serial devices by transmitting data one bit at a time over a single wire. They operate asynchronously using a start bit, data bits, optional parity bit, and stop bits in each transmitted character. While serial ports are less common now due to the prevalence of USB, they enabled connectivity to early modems, printers, and other devices. Serial communication involves converting parallel internal data to serial form for transmission and back to parallel at the receiving end using shift registers. Standards like RS-232 define the electrical and physical specifications for serial ports and cables.

Uploaded by

Hafiz
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
119 views19 pages

Serial Interface

Serial ports allow computers to communicate with external serial devices by transmitting data one bit at a time over a single wire. They operate asynchronously using a start bit, data bits, optional parity bit, and stop bits in each transmitted character. While serial ports are less common now due to the prevalence of USB, they enabled connectivity to early modems, printers, and other devices. Serial communication involves converting parallel internal data to serial form for transmission and back to parallel at the receiving end using shift registers. Standards like RS-232 define the electrical and physical specifications for serial ports and cables.

Uploaded by

Hafiz
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 19

Serial Interface

•Considered to be one of the most basic external connections to a computer, the


serial port has been an integral part of most computers for more than 20 years.
Although many of the newer systems have done away with the serial port
completely in favor of USB connections, most modems still use the serial port,
as do some printers, PDAs and digital cameras.

•Essentially, serial ports provide a standard connector and protocol to let you
attach devices, such as modems, to your computer.
Serial Interface
The name "serial" comes from the fact that a serial port "serializes" data. That is,
it takes a byte of data and transmits the 8 bits in the byte one at a time.

The advantage is that a serial port needs only one wire to transmit the 8 bits
(while a parallel port needs 8). So to send data in long distance it may be
converted in serial form.

The disadvantage is that it takes 8 times longer to transmit the data than it would
if there were 8 wires. Serial ports lower cable costs and make cables smaller.
Serial Interface
Serial ports, also called communication (COM) ports, are bi-
directional.

Bi-directional communication allows each device to receive data as well


as transmit it. Serial devices use different pins to receive and transmit
data -- using the same pins would limit communication to half-duplex,
meaning that information could only travel in one direction at a time.

Using different pins allows for full-duplex communication, in which


information can travel in both directions at once.
Serial Interface
•Data is moved in parallel within a computer.To interface a computer with
serial data lines, the data must be converted to and from serial form.
• A parallel-in-serial out shift register and a serial-in-parallel out shift
register can be used to do this.
Parallel-Serial Conversion
•For Transmission, parallel data word is loaded into the shift register.
•A pulse on the clock input causes the data to be shifted.
•For an n-bit data word n clock pulses will output the word in serial form.
Serial-Parallel Conversion
•Reception of the serial data is performed by another shift register, in a
serial-to-parallel convertor.
•A sequence of n clock pulses causes the input to propagate along the shift
register until it is all available in parallel.
•The first bit to arrive is shifted all the way through the shift register and
appears at the right hand end.
Serial data can be sent synchronously or asynchronously.
Asynchronous Transmission
Asynchronous Transmission
•For asynchronous transmission, characters are transmitted in the format
shown in fig.
•Between characters the line is in Idle state which is called Mark or 1.
•The first bit of the character, the Start bit, is in the Space or 0.
•The 1 to 0 transition is used to start the receiver clock and indicates that a
character is arriving.
•The first bit of data could not be used as a start bit because on those
occasions that it was a 1 , it would be indistinguishable from the idle
condition.
•For the data part of the character bits are transmitted with the LSB first.
•Following the data bits there may be a parity bit to allow transmission errors
to be detected.
•Finally the line returns to the idle state for 1,1.5 or 2 stop bits which allow
receiver to be ready for the next character.
•Because of this format, this is also known as stop-start transmission.
Baud Rate

„ Transmission rates are sometimes expressed in


bauds.
„ The baud is a communication engineering unit
which expresses modulation rate .
„ But a signalling element does not always represent
1 bit and hence 1 baud is not necessarily 1 bit/sec.
„ For example, if a signaling element can have one
of the four possible voltage levels, say, 0,1,2, or 3v
then each level can represent a pair of data bits,
say, 00, 01, 10, 11 and 1200 baud would convey 2400
bits/sec.
Synchronous Transmission
„ Data are sent continuously.
„ There is no start bit to indicate where a character begins.So this must
be achieved by special sequence of data known as protocol.
„ One such protocol HDLC format is shown below:
Synchronous Transmission
„ Character synchronization is achieved by identifying a special pattern
of bits (01111110) known as a Flag.
„ This pattern is unique and can never occur in the data stream except as
a flag.
„ Since the flag contains 6 consecutive 1s, data to be transmitted is
checked for 5 consecutive 1s and if found a 0 is inserted after them.
This technique is called Bit Stuffing.
Bit Stuffing
‰ To interface with parallel devices it is necessary to convert data to and from
serial form.

‰ We need some handshaking circuitry to ensure that transmitter does not send
faster than it can be read by the receiver.

‰ There are available devices which contains most of the circuitry needed for serial
communication.

‰ Serial ports rely on a special controller chip, the Universal Asynchronous


Receiver/Transmitter (UART), to function properly. The UART chip takes the
parallel output of the computer's system bus and transforms it into serial form for
transmission through the serial port. In order to function faster, most UART chips
have a built-in buffer of anywhere from 16 to 64 kilobytes. This buffer allows the
chip to cache data coming in from the system bus while it is processing data going
out to the serial port. But it can only do asynchronous communication.

‰ A device such as Intel 8251A, which can perform both asynchronous and
synchronous communication, is called a Universal synchronous-asynchronous
receiver-transmitter or USART.
RS232/V24 Standard
D-Type Connector
Computer-Peripheral Connections
Null Modem Cable

You might also like