45039336 rs232

22
RS-232 Mitesh N Doshi, Dept of Instrumentation Technology, RVCE

Upload: asubramaniyam

Post on 15-Dec-2014

543 views

Category:

Technology


5 download

DESCRIPTION

444

TRANSCRIPT

Page 1: 45039336 rs232

RS-232

Mitesh N Doshi,Dept of Instrumentation Technology,RVCE

Page 2: 45039336 rs232

Why Serial Communications?

Serial communication is the most simplistic form of communication between two devices.It’s what started networking!

Page 3: 45039336 rs232

So What is RS-232?

RS-232 is a standard by which two serial devices communicate: The connection must be no longer

than 50 feet. Transmission voltages are –15V and

+15V. It is designed around transmission of

characters (of 7 bits of length).

Page 4: 45039336 rs232

RS-232 (cont.)

One important aspect of RS-232 is that it is an asynchronous form of communication. Transmitter and receiver do not explicitly coordinate each data transmission. Transmitter can wait arbitrarily long between transmissions .

Page 5: 45039336 rs232

Logical Voltages

RS-232 is a little non-intunitave at first.Logical 1 is –15VDC.Logical 0 is +15VDC.When the connection is idle, the hardware ties the connection to logical 1.

Page 6: 45039336 rs232

How Can You Transmit Data?

RS-232 communication is dependent on a set timing speed at which both pieces of hardware communicate. In other words, the hardware knows how long a bit should be high or low.RS-232 also specifies the use of “start” and “stop” bits.

Page 7: 45039336 rs232

Sending One Character

Every time a character is sent, the same communication occurs:

1. Start bit sent.2. Seven data bits sent.3. Stop bit sent.

This communication is dependent on the fact that both devices are sampling the bits at the same rate!

Page 8: 45039336 rs232

Ok, So What’s the Start Bit?

The start bit is a logical 0 sent on the line to tell the other device to start sampling.Remember, the logical 0 is +15VDC.

Page 9: 45039336 rs232

And the Stop Bit?

The stop bit is a logical 1. –15VDC.A stop bit is always sent (per RS-232 standards).

Page 10: 45039336 rs232

To Talk the Talk…

We’ve mentioned that both devices must have the same speeds to talk, but they must also know to handle problems.The transmission rate of serial devices is called baud. It is the number of changes in the signal per second.

Page 11: 45039336 rs232

A Sample Transmission

Page 12: 45039336 rs232

Components of standard:

Connection must be less than 50 feet Data represented by voltages between

+15v and -15v 25-pin connector, with specific signals such

as data, ground and control assigned to designated pins

Specifies transmission of characters between, e.g., a terminal and a modem

Transmitter never leaves wire at 0v; when idle, transmitter puts negative voltage (a 1) on the wire

Page 13: 45039336 rs232

Common Serial Settings

Most settings are read in the following form: Bits per second Number of data bits Parity Number of Stop bits

Page 14: 45039336 rs232

Line Sampling & Framing

RS-232 hardware samples the line multiple times during a single bit transmission. If the samples do not all have the same voltage, a framing error occurs.A framing error should only occur if one device is sending faster than the other device is set to receive.An intentional frame error can be caused by sending a BREAK.

Page 15: 45039336 rs232

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.

Page 16: 45039336 rs232

Pin Configuration

Page 17: 45039336 rs232

Pins• DCD(Data Carrier Detect)-Tells the computer that the modem is

connected by telephone with another modem. • RD(Receive Data)-Data transmitted from the modem to the

computer.• TD(Transmit Data)-Data transmitted from the computer or terminal

to the modem.• DTR(Data Terminal Ready)-Tells the modem that the computer is

turned on and ready to accept connections.• SG(Signal Ground)-Reference point for all signal voltages.• DSR(Data Set Ready)-Tells the computer that the modem is turned

on. The computer should not send the modem commands if this signal is not present.

• RTS(Request to Send)-Tells the modem when it can transmit data. Sometimes the computer is busy and needs to have the modem wait before the next character is transmitted

• CTS(Clear to Send)-Tells the computer when it's okay to transmit data. Sometimes the modem is busy and needs to have the computer wait before the next character is transmitted.

• RI(Ring Indicator)-Tells the computer that the telephone is ringing.

Page 18: 45039336 rs232

Connector Types

The two different connectors are associated with two major types of hardwareThe Computer Terminal Equipment (CTE) and the Data Terminal Equipment (DTE).

Page 19: 45039336 rs232

Connector Types (cont.)

For ease-of-use, a computer will transmit on pin 2 and receive on pin 3 (the CTE, remember).Vice versa: a modem will transmit on pin 3, and receive on pin 2 (for the DTE).

Page 20: 45039336 rs232

Speed Limitations (cont.)

However, serial communications between devices also has its own speed barrier.RS-232 was designed with the understanding that the analog world is far from perfect. Digital is fast, analog is slow. RS-232 is analog, therefore is it slow (in computing terms).

Page 21: 45039336 rs232

Questions??

Page 22: 45039336 rs232

Thank You