Serial communication is a way enables different types of equipment to communicate with their outside world. It is called serial because the data bits will be sent in a serial way over a single line. Serial ports are controlled by a special chip called UART (Universal Asynchronous Receiver Transmitter).
Different applications use different pins on the serial port and this basically depends on the functions required.
While sending a byte, the UART (serial port) first sends a START BIT followed by the data (general 8 bits, but could be 5, 6, 7, or 8 bits) followed by one or two STOP BITs. The sequence is repeated for each byte sent.
Serial communication can be half duplex or full duplex. Full duplex communication means that a device can receive and transmit data at the same time. Half duplex means that the device cannot send and receive at the same time. It can do them both, but not at the same time.
Advantages of serial communication:
One of the advantages is transmission distance, a serial link can send data to a remote device more far than parallel link.
Simple serial link cable connection
Use less number of wire
Serial link is used also for Infrared communication, now many devices such as laptops & printers can communicate via an inferred link.
RS 232 interface standard was developed to interface between DTE( DATA TERMINAL EQUIPMENT) and DCE ( DATA COMMUNICATION EQUIPMENT) employing serial binary data exchange. It was developed for interfacing data terminals to modems.
RS 232 interface standard specifies the method of connection of two devices – THE DTE and DCE.
DTE: DTE device communicates with DCE device.DTE device transmits data on pin 2 and receives data on pin 3.
eg: a retransmitter printer.
DCE: DCE receives data from DTE and retransmit via another data communication link such as telephone system. A DCE device transmit data on pin 3 and receives data on pin 2.
Electrical signal characteristics of RS232:
The RS 232 transmitter is required to produce voltages in the range :
LOGIC 1 : -5V TO -25V.
LOGIC 0 : +5V TO +25V.
The RS 232 receiver is required to produce voltages in the range :
LOGIC 1 : -3V TO -25V.
LOGIC 0 : +3V TO +25V.
The RS-232 standard defines 25 electrical connections. The electrical connections are divided into 4 groups.
Data lines – used to transfer data:
DTE - PIN2 (transmit pin) - PIN 3 (Receive pin)
DCE - PIN 3 (transmit pin) - PIN 2 (Receive pin)
Control lines- used for interactive device control, known as hardware handshaking. They regulate the way in which data flows across the interface.
Mechanical characteristics of RS 232:
RS–232 specifies a 25–pin connector. Most popular is the 9–position DB-9 connector
Circuit functions are defined with reference to the DTE.
TRANSMITTED DATA (TD): This line carries serial data from the DTE to the corresponding pin on DCE.
RECEIVED DATA (RD): This line carries serial data from the DCE to the corresponding pin on DTE.
REQUEST TO SEND (RTS): Request to send hardware control line.This line is placed active when DTE requests permission to send data.
CLEAR TO SEND (CTS): The DCE activates the CTS(clear to send) for hardware data flow control. After the DCE sees an asserted RTS, it turns CTS ON when it is ready to begin communication.
DATA SET READY (DSR): DTE ready line is an indication from DCE to the DTE that the modem is ready.
DATA CARRIER DETECT (DCD): This signal is turned ON when the DCE is receiving a signal.
DATA TERMINAL READY (DTR): DTR indicates the readiness of the DTE. This signal is turned ON by the DTE when it is ready to transmit or receive data from the DCE.
RING INDICATOR (RI): RI, when asserted, indicates that a ringing signal is being received on the communications channel.
The RS-232-C standard specifies that the maximum length of cable between the transmitter and receiver should not exceed 100 feet. The limited range of the RS-232C standard is one of its major shortcomings compared with other standards