Position: Index > Unclassified >

RS232 interface standard overview

2017-12-21 00:47  
Declaration:We aim to transmit more information by carrying articles . We will delete it soon, if we are involved in the problems of article content ,copyright or other problems.

This is pretty old standard but stil widely used in embedded systems. Using RS232 interface standard the ata is sent bit by bit. Usually first comes LSB. Receiver receives data by knowing the position of each data piece and delay. In order to ensure the quality of data transmission, we need to control the start of transmission. This is done by acknowledgment procedure. Lets take assymetrical type of interface RS232-C. Transmitter sends RTC (request to send) signal to receiver. In other hand receiver detects this signal, finishes previous operation and then sends to receiver CTS (clear to send) signal, what menas that receiver is ready to accept data. Without CTS transmitter cannot start data transmission.

Note: In RS232 interface logical a€?1a€? corresponds to voltages from -3V to -12V and logical a€?0a€? corresponds to voltages from 3V to 12V. The logical level in interval -3V to 3V is undefined.

Lets take some example. If we want to send byte1100111011

send_byte.PNG

This byte is sent assynchronously. This means that receiver doesn’t know when transmitter will start sending data. But anyway there is some means needed to inform about the start of transmission. For this is START bit used at the beginning of the transmitted data. Falling edge of START bit (from logical a€?1a€? to a€?0a€?) informs receiver about start of transmission. After receiver detected the start signal, it starts reading data after time equal to half period of start signal. This ensures that data will be read correctly. All those operations are performed by hardware (DIG-UART a€“ universal asynchronous receiver transmitter).

After last MSB bit is received, then follows Parity bit, which allows user to control received information by parity or he can skip the control. If control is selected, then bit will be a€?1a€? if there will be even number of ones and a€?0a€? otherwise. After byte is received, UART stores it in data register and informs that data is ready to take. Microcontroller has to read this byte before next byte is received. Otherwise data will be lost.

Usually hardware checking of received data is disabled, because it is substituted by CRC (cyclic redundance check) calculation and transmition. Receiver first receive the data array where is also a CRC code, then receiver recalculates CRC and compares to received one. If CRC codes doesn’t match than transmission is repeated.

RS232 interface has its popularity because it is simple to use and cheap. But it also has a disadvantages like crosstalk. It is sensitive to different grounds of receiver and transmitter. This reduces the speed and distance of communication.

In RS232 standard there are two connection types used: DB9 and DB25. DB25 connector is obsolete.

RS232_DB9_DB25.jpg

The pins:

CTS Clear To Send [DCE -->DTE]
DCD Data Carrier Detected (Tone from a modem) [DCE -->DTE]
DCE Data Communications Equipment eg. modem
DSR Data Set Ready [DCE -->DTE]
DSRS Data Signal Rate Selector [DCE -->DTE] (Not commonly used)
DTE Data Terminal Equipment eg. computer, printer
DTR Data Terminal Ready [DTE -->DCE]
FG Frame Ground (screen or chassis)
NC No Connection
RCk Receiver (external) Clock input
RI Ring Indicator (ringing tone detected)
RTS Ready To Send [DTE -->DCE]
RxD Received Data [DCE -->DTE]
SG Signal Ground
SCTS Secondary Clear To Send [DCE -->DTE]
SDCD Secondary Data Carrier Detected (Tone from a modem)[DCE -->DTE]
SRTS Secondary Ready To Send [DTE -->DCE]
SRxD Secondary Received Data [DCE -->DTE]
STxD Secondary Transmitted Data [DTE -->DTE]
TxD Transmitted Data [DTE -->DTE]


Reprinted Url Of This Article:
http://www.scienceprog.com/rs232-interface-standard-overview/