Title: Dr Richard Reilly
1Lecture 10
- To insert your company logo on this slide
- From the Insert Menu
- Select Picture
- Locate your logo file
- Click OK
- To resize the logo
- Click anywhere inside the logo. The boxes that
appear outside the logo are known as resize
handles. - Use these to resize the object.
- If you hold down the shift key before using the
resize handles, you will maintain the proportions
of the object you wish to resize.
- Dr Richard Reilly
- Dept. of Electronic Electrical Engineering
- Room 153,
- Engineering Building
2SERIAL COMMUNICATION
- Computerised control and data management systems
require extensive digital communication between
the processor and external devices such as - Â
- Â
     keyboards      printers, plotters
connected locally or at some distance     Â
video terminals      A/D converters     Â
computer networks
- Often rate in digital communication is in the
order of - Â Â Â Â Â a few bytes per second
- Compare with communication on the data bus
(million-bytes-per second)
3SERIAL COMMUNICATION
- In most cases, more economical to send the 8-bits
of a data byte - Â Â Â Â Â sequentially on a single transmission line
- Â Â Â Â Â repacking serialised bits into a parallel
byte at receiving end. - Â
- Thus information is transmitted where
- Â Â Â Â Â information normally consists of more than
one bit - Â Â Â Â Â the bits are sent along transmission line
sequentially - ? separated in time rather than in space
as the case in a parallel interface.
4SERIAL COMMUNICATION
- The basic concept of serial communications is
- a parallel to serial converter at the T/x
- and
- a serial to parallel converter at the R/x Â
- If sending information sequentially one question.
How do you know the start of a byte of data ?
5Synchronous and Asynchronous
- Need method of indicating the start of a byte or
a word of data. - Â
- Can divide serial communications into based on
use of clock signal
- synchronous and
- asynchronousÂ
- Synchronous communication
- uses clock signal as one of the communication
signals. - Clock signal defines the transitions from one-bit
to the next and the centre of the bit.
6Synchronous and Asynchronous
- Asynchronous communication does not use a clock
signal as one of the communication signals. - Each Rx must generate its own local estimate of
the clock used at the T/x. - Â
- Â
- Asynchronous uses less signals than synchronous
communication but is usually slower. - Â
Asynchronous less signals -- slower
7 Synchronous Communication
- A clock signal defines the bit positions
8Synchronous Communication
- Changes on the positive clock edge
- Þ on negative clock edge a new bit is latched in
at R/x side. - Â
- There is a half-a clock period to allow for
propagation delay and ringing.
9Synchronous Communicationwith Frame Sync
- One means of defining the bits of the serial
stream that correspond to a byte is to use an
additional signal known as a frame sync. - Â
- Hence a communication link could use
- Â
- Â Â Â Â Â TxD Transmit Data line (serial data)
- Â Â Â Â Â TxFS Frame Sync Transmit
- Â Â Â Â Â Clk Clock (common to both T/x and R/x)
- Â Â Â Â Â RxD Receive Data
- Â Â Â Â Â RxFS Frame Sync Receive
- Â Â Â Â Â Gnd ground
10Synchronous Communicationwith Frame Sync
- A byte wide Frame Sync is high during the period
of time the data corresponds to bits of the byte. - the R/X only clocks in the bits if TxFS is high.
11Synchronous Communicationwith Frame Sync
- For Bit Wide Frame Sync ? Frame Sync high only
for first bit. - Hence R/X starts to latch in bits when it
receives a Frame Sync pulse, - then latches in a total of 8 bits (must use an
internal counter).
12Serial Connections
- Term full-duplex is used to describe transmission
system where - Â Â Â Â Â transmission occurs in both directions
simultaneously - Â Â Â Â Â such as a serial transmission with one
line for each direction.
The half-duplex describes the transmission system
where      transmission occurs in both
directions but only one way at a time      as
would be constrained by a single shared line.
- If transmission is only in one direction the term
simplex is used.
13Serial Connections
- The T/x and R/x have to be configured for the
same synchronous communication format.
- The bit rate
- Continuous Clock with Frame Sync
- Byte/Bit Frame Sync
- Word Length (number of bits sent each time)
- Electrical connections between the device and the
serial interface usually conform to a standard
known as RS-232/V24. - this standard not only specifies the voltages but
also the allocation of pins on the interface
14How are the two transceivers connected ?
- The two serial ports are connected by crossing
over T/x and R/x lines.
15RS-232
16RS-232 Cable Lengths
Maximum Length (meters)
Data Rate (bps)
2400
120
4800
60
9600
30
19200
15
38400
7.5
57600
5
115200
2.5
17Asynchronous Communication
- With asynchronous serial communications the only
connections necessary are - TxD
- Rxd
- Gnd
- There are no clocks or Frame Syncs connected
between the two serial ports.
- As there are no synchronising signals present
- ? must introduce one !!
- Additional bits of data are inserted in TxD and
RxD to allow the serial port to identify the
first bit
18Asynchronous Communication
- The following bits are used.
- Â
- START Bit This is a 0. It is sent just before
the data bits - DATA Bits Usually 7 or 8 data bits (LSB sent
first) - PARITY Bit Used for error correction
- STOP Bit This is a 1. One or two stops bits
used after data. - Â
- Either even or odd parity can be used.
- The parity bit is chosen so that the number of
ones in the data bits Parity is even or odd. -
- e.g. 8 data bits, 1 stop bit and even parity.
19Asynchronous Communication
- Due to these extra bits that are sent ?
- Asynchronous transmission tends to be slower than
synchronous - can be 20 of 30 slower
- high speed transmission tends to use synchronous
transmission format
- The R/x must know the bit-rate (usually called
the baud rate). - However, the baud rate is strictly speaking the
number of pieces of information per second.
20Asynchronous Communication
- There are several standard rates of character
transmission - 110, 300, 600, 1200, 2400, 4800, 9600, 19600,
28800, 57600 bits per second - Â
- Typically rate would be 9600 bits per second
- ? each bit has a bit-period of 104 microseconds
- Â
- Using 7-bit ASCII
- ? 1711 10bits
- ? 960 characters per second.
21Asynchronous Communication
- Asynchronous systems use an external clock that
is 16 times faster then the Bit rate. - Â
- When the negative edge of the start pulse arrives
- ? counts 8 clock cycles to find the approximate
centre of start pulse - Â
- The centre of the remaining bits is estimated at
16 clock cycles intervals. - Â ? the bit is read at the middle of its bit
period of the T/X and R/X baud rates are the
same. - Â Â
- As a start bit arrives every byte
- ? the point in time at which the bit is latched
is re-synchronised every byte. - ? as there is a minimum of one start bit and one
stop bit, the 1 ? 0 transition at the start bit
is guaranteed.