Nothing Special   »   [go: up one dir, main page]

L-6 Peripheral Interface

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 26

PERIPHERAL

INTERFACING
RS-232C

Arpita howlader
Dept of Computer & Communication Engineering
Patuakhali Science and Technology University

CCE- 321 (Computer Peripheral and Interfacing) 1


Serial communication example
• Universal serial bus
– Is a serial bus standard to connect devices to a host computer.
– Designed to allow many peripherals to be connected using a single
standardized interface socket. A standard connection method.
– Devices to be connected and disconnected without rebooting the
computer or turning off the device and intended to replace many varieties
of serial and parallel ports.
– connect computer peripherals such as mice, keyboards, joysticks, scanners,
digital cameras, printers, flash drives, and external hard drives.
• PCI express (Peripheral component interconnect )
– A serial connection that operates more like a network than a bus.
– Instead of one bus that handles data from multiple sources,
– PCIE adopts point-to-point serial connections which decrease cost of the
system. Motherboard interface of video capture cards.
– PCI is a parallel interface while PCI Express is a serial interface. Used for
hard drives, sound card, Wi-Fi and Ethernet.

2
CCE- 321 (Computer Peripheral and Interfacing)
Serial communication example
• Rs-232
– Standard for serial communication transmission of data that abbreviated
from recommend  standard number 232 and c is the latest revision of
the standard. Used to connect printer, data storage
– Although serial transmission only one wire is used for data transfer but rs-
232 cable can theoretically accommodate 25 wires but most of these pins
are not needed for normal pc communications
– New PCs are equipped with male d type connectors having only 9 pins.
• Rs-423
– Rs-423 is replacement of  the older rs-232 serial communication
– Defines a UNI-directional interface between one transmitter and many
receivers.
– Rs-423 allows for distances up to 4000 feet but it is limited data transfer
rates of 100 kb/sec.

3
CCE- 321 (Computer Peripheral and Interfacing)
Examples of parallel communication
• Conventional PCI
– Conventional PCI (peripheral component interconnect) is a computer
port for attaching different hardware devices in a computer.
– Include a full plug-and-play capability. This means the computer bios
or operating system can determine the resource requirements
– Adding PCI cards upgrade computer because helps to add better video
cards, faster wired or wireless networking
– 32bit, 33MHz PCI standard was capable of sending and receiving data at
a rate of 133Mbps.
– 64bit, 66MHz is an upgraded standard that supports a faster data
transferring rate at a frequency up to 533 MHz.
– PCI data security standard designed to build and maintain secure network
, protect cardholder data, monitor and test networks

4
CCE- 321 (Computer Peripheral and Interfacing)
Examples of parallel communication
• Industry standard architecture (ISA)
– ISA stand for industry standard architecture is a type of bus used in PCs
for adding expansion cards. Used to add extra serial port
– Isa slot is used  for  video card, a network card, or an extra serial
port. ISA ports were replaced by faster PCI and AGP and PCI-E slots.
• Parallel  ATA
– PATA short for parallel (Advanced Technology Attachment) is an
interface standard for the connection of storage devices such as hard
disks, solid-state drives, and CD-ROM drives in computers.
– PATA was only called ATA, renamed when serial ATA (SATA) standard
came which uses only a few wires and cheaper connectors and cables,
and it transfers data much faster than ATA
– Normally PATA cable connected form IDE to pc board which is called
IDE (Integrated Drive Electronics) connecter and other to storage device
for example hard disk.

5
CCE- 321 (Computer Peripheral and Interfacing)
Examples of parallel communication
• IEEE 1284
– The IEEE 1284 parallel interface standard is bi-directional parallel
communications between computers and other devices. 
– Standard for connecting a computer to a printer or certain other devices
over a parallel (eight bits of data at a time) physical and electrical
interface .
• AGP:
– The Accelerated Graphics Port (AGP) was designed as a high-speed
point-to-point channel for attaching a video card to a computer system
– primarily to assist in the acceleration of 3D computer graphics.
– Designed as a successor to PCI-type connections for video cards.

6
CCE- 321 (Computer Peripheral and Interfacing)
Standards in Serial I/O
• The serial input output technique is commonly used to interface terminals, printers
and modems.
• These peripherals and computers are designed and manufactured by various
manufacturers.
• Therefore, a common understanding must exist among various manufacturing and
user groups that can ensure the compatibility among different equipment's.
• When this understanding is defined and generally accepted in industry, (and by
users), it is known as standard.
• A standard is normally defined by a professional organization (such as IEEE, ITU,
and ISO etc.).
• A standard may include such items as assignment of pin positions for signals,
voltage levels, speed of data transfer, length of cables and other mechanical
specification.

7
CCE- 321 (Computer Peripheral and Interfacing)
RS-232C
• RS-232 is an asynchronous communication protocol and interface that
computer used to connect and exchange or transfer a single byte of data
over a serial cable to other devices.
• In telecommunications, RS-232 is the traditional name for a series of
standards for serial binary single-ended data and control signals
connecting between DTE (data terminal equipment) and DCE (data
circuit-terminating equipment, originally defined as data communication
equipment).
• It is commonly used in computer serial ports.
• The standard defines the electrical characteristics and timing of signals,
the meaning of signals, and the physical size and pin out of connectors.
• Standard feature of a personal computer, used for connections to modems,
printers, mice, data storage, uninterruptible, and other peripheral
devices.

CCE- 321 (Computer Peripheral and Interfacing) 8


RS-232C
• However, the low transmission speed, large voltage swing, and large standard
connectors motivated development of the Universal Serial Bus, which has
displaced RS-232 from most of its peripheral interface roles.
• Many modern personal computers have no RS-232 ports and must use either an
external USB-to-RS-232 converter or an internal expansion card with one or more
serial ports to connect to RS-232 peripherals.
• RS-232 are still found, especially in industrial machines, networking equipment,
and scientific instruments.

9
CCE- 321 (Computer Peripheral and Interfacing)
Block Diagram of RS-232C
• In serial I/O, data can be transmitted either as current or voltage. When data are
transmitted as voltage, the commonly used standard is known as RS-232C.
– It is defined in reference to DTE and DCE.
– However, its voltage levels are not compatible with TTL logic levels.
– The rate of data transmission in RS-232C is restricted to a maximum of 20
kilo baud rate and a distance of 50 feet.
– For high speed data transmission, new standards are RS-422A and RS-423A,
however, they are not yet widely used.
– RS-232C has 25-pin connector and its signals. The signals are divided into four
groups. They are
• Data signals
• Control signals
• Timing signals
• Ground

10
CCE- 321 (Computer Peripheral and Interfacing)
Block Diagram of RS-232C
– For data lines, the voltage level from +3V to +15V are defined as logic 0 and
from -3V to -15V is defined as logic 1.
– However, other signals (control and timing) are compatible with TTL levels.
Because of incompatibility of the data lines with the TTL logic, voltage
translators are used called line drivers and line receivers are required to
interface TTL logic with RS-232C signals.
– The line driver MC 1488 converts logic 1 into approximate -9V and logic 0
into +9V.
– Before it is received by DCE, the line receiver MC 1489 converts into TTL
compatible logic.
– The reason behind converting low voltages into higher level is the
development of RS 232C prior to TTL logic and also due to noise margin.

11
CCE- 321 (Computer Peripheral and Interfacing)
RS-232C connection
• In 8251A (USART), we discussed how serial communication takes place. The
TTL signals output by a USART, however, are not suitable for transmission
over long distances, so these signals are converted to some other form to be
transmitted.
• In this section we discuss device used to send serial data signals over long
distances.
– RS232 is the most widely used serial I/O interfacing standard.
– However the I/O voltage levels are not TTL compatible. In the RS232, a
1bit is represented by –3 to –25 V, while 0 bit is +3 to +25 V, making –3 to
+3 undefined.
– For this reason, voltage converter such as MC1488 and MC1489 are used to
convert the TTL logic levels to the RS232 voltage levels and vice versa. See
Figure below.

CCE- 321 (Computer Peripheral and Interfacing) 12


RS-232C connection
• RS-232 stands for Recommend Standard number 232 and C is the latest revision of
the standard. The serial ports on most computers use a subset of the RS-232C
standard. The full RS-232C standard specifies a 25-pin "D" connector of which 22
pins are used. Most of these pins are not needed for normal PC communications,
and indeed, most new PCs are equipped with male D type connectors having only 9
pins.

CCE- 321 (Computer Peripheral and Interfacing) 13


RS-232C connection
• DCE and DTE Devices
– DTE stands for Data Terminal Equipment, and DCE stands for Data
Communications Equipment. These terms are used to indicate the pin-out for
the connectors on a device and the direction of the signals on the pins.
– Computer is a DTE device, while most other devices are usually DCE devices.
– So replace the term "DTE device" with " PC“ and the term "DCE device"
with "remote device" in the following discussion.
– The RS-232 standard states that DTE devices use a 25-pin male connector,
and DCE devices use a 25-pin female connector.
– Therefore connect a DTE device to a DCE using a straight pin-for-pin
connection.
– However, to connect two like devices, can instead use a null modem cable.
Null modem cables cross the transmit and receive lines in the cable

CCE- 321 (Computer Peripheral and Interfacing) 14


RS-232C connection

CCE- 321 (Computer Peripheral and Interfacing) 15


RS-232C connection
• The TD (transmit data) wire is the one through which data from a DTE device is
transmitted to a DCE device. This name can be deceiving, because this wire is used
by a DCE device to receive its data. The TD line is kept in a mark condition by the
DTE device when it is idle. The RD (receive data) wire is the one on which data is
received by a DTE device, and the DCE device keeps this line in a mark condition
when idle.

CCE- 321 (Computer Peripheral and Interfacing) 16


RS-232C connection
• RTS and CTS
– RTS line stands for Request To Send and the CTS line are used when "hardware flow
control" is enabled in both the DTE and DCE devices.
– The DTE device puts RTS line in a mark condition to tell the remote device that it is
ready and able to receive data. (When receive incoming data)
– If the DTE device is not able to receive data (typically because its receive buffer is
almost full), it will put RTS line in the space condition as a signal to the DCE to stop
sending data.
– When the DTE device is ready to receive more data (i.e. after data has been removed
from its receive buffer), it will place RTS line back in the mark condition.
– The complement of the RTS wire is CTS, which stands for Clear To Send.
– The DCE device puts CTS line in a mark condition to tell the DTE device that it is
ready to receive the data.
– Likewise, if the DCE device is unable to receive data, it will place this line in the space
condition.
– Together, these two lines make up what is called RTS/CTS or "hardware“ flow control.

CCE- 321 (Computer Peripheral and


17
Interfacing)
RS-232C connection
• DTR ( Data Terminal Ready) intended function is similar to RTS line
– DSR (Data Set Ready) is the companion to DTR in the same way that CTS is to RTS.
– Some serial devices use DTR and DSR as signals to simply confirm that a device is
connected and is turned on.
– The DTR and DSR lines were designed to provide an alternate method of hardware
handshaking so pointless to use both RTS/CTS and DTR/DSR for flow control
signals at the same time. Because of this, DTR and DSR are rarely used for flow
control.
• CD (Carrier Detect)
– used by a modem to signal that it has a made a connection with another modem, or has
detected a carrier tone.
– The last remaining line is RI or Ring Indicator. A modem toggles the state of this line
when an incoming call rings phone.
– The Carrier Detect (CD) and the Ring Indicator (RI) lines are only available in
connections to a modem. Because most modems transmit status information to a PC
when either a carrier signal is detected (i.e. when a connection is made to another
modem) or when the line is ringing, these two lines are rarely used.

CCE- 321 (Computer Peripheral and Interfacing) 18


RS-232C connection
• 9 to 25 Pin Adapters
• The following table shows the connections inside a standard 9 pin to 25 pin
adapter.

CCE- 321 (Computer Peripheral and Interfacing) 19


RS-232C connection Example

Fig (a):-DTE to DCE Fig (b):-DTE to DTE (null modem)

CCE- 321 (Computer Peripheral and Interfacing) 20


RS-232C connection Example
• The minimum interface between a computer and a peripheral requires 3 lines :
pins 2, 3 and 7 as shown in figure.
• These lines are defined in relation to DTE; the terminal transmits on pin 2 and
receives on pin 3.
• On the other hand, the DCE transmits on pin 3 and receives on pin 2.
• For example, the user may connect its microcomputer to serial printer configured
as DTE. Therefore, to remain compatible with the defined signals of RS-232C, the
RS-232C cable must be reconfigured as shown in figure (b) above.
• In figure (a), the microcomputer is defined as a DTE, and it can be connected to the
modem defined as a DCE, without any modification in RS-232C cable.
• However, when it is connected to the printers, the transmitted and received
lines must be crossed as shown in figure (b). This is also known as Null modem
connection.

CCE- 321 (Computer Peripheral and Interfacing) 21


RS-232C connection
• Pin details of 9-pin and 25-pin

• Comparison of serial I/O standards

CCE- 321 (Computer Peripheral


22
and Interfacing)
RS-232 Handshaking
• In order that data can be exchanged on an RS 232 link, the control signals must
indicate that the equipment at either end of the link is ready to send the data and
ready to receive the data. This can be achieved in a number of ways, but one of
the more common is to use the RTS, CTS, and DTR lines.

• These lines are found in the Data Terminal Equipment, DTE and Data
Communications Equipment, DCE as follows:

LINE LINE NAME EQUIPMENT


ABBREVIATION
RTS Request to Send DTE
CTS Clear to Send DCE
DTR Data Terminal Ready DTE

CCE- 321 (Computer Peripheral and Interfacing) 23


RS-232 Handshaking
• The handshaking exchange to start the data flow is quite straightforward and can be
seen as a number of distinct stages:
– RTS is put in the ON state by the DTE.
– The DCE then put the CTS line into the ON state.
– The DTE then responds by placing the DTR line into the ON state.
– The DTR line remains on while data is being transmitted.
• At the end of the transmission, DTR and RTS are pulled to the OFF state and then
the DCE pulls the CTS line to the OFF state.

• This series of handshake controls was devised to allow the DTE to request control
of the communications link from the related modem, and then to let the modem
inform the terminal equipment that the control has been acquired. In this way the
communications will only take place when both ends of the link are ready.

CCE- 321 (Computer Peripheral and Interfacing) 24


RS-232 Handshaking
• The RS 232 data communications
standard is a reliable for of data
communications which has been
used for many years and shows every
sign of being used for many years to
come. In order that it is able to
communicate satisfactorily the RS
232 signals and voltage levels must
be able to ensure that the line
receivers are able to decode the
data with no errors and that the
communications protocols are
adhered to. Once these are all
established, data can be exchanged
reliably and efficiently.

CCE- 321 (Computer Peripheral and Interfacing) 25


THANKS

END
INPUT / OUTPUT

26
CCE- 321 (Computer Peripheral and Interfacing)

You might also like