RS232 interface standard overview
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 “1“ corresponds to voltages from -3V to -12V and logical “0“ 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 byte 1100111011
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 “1” to “0”) 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 – 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 “1” if there will be even number of ones and “0” 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.

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]
Blogsphere: TechnoratiFeedsterBloglines
Bookmark: Del.icio.usSpurlFurlSimpyBlinkDigg
RSS feed for comments on this post | TrackBack URI for this post
New on WinAVR Tutorial
Running TX433 and RX433 RF modules with AVR microcontrollers,Sometimes in embedded design you may want to go wireless. Might be you will want to log various readi …Programming AVR ADC module with WinAVR,Most of AVR microcontrollers have Analog to Digital Converter (ADC) integrated in to chip. Such solut … |
New on WinARM Tutorial
What are differences between WinARM and WinAVR,Everyone who is working with AVR microcontrollers knows this powerful tool – WinAVR (http://win …LPC2000 watchdog timer,As in all microcontrollers watchdog timers purpose isto reset microcontroller after reasonable amount … |
