In RS 232, the term RS stands for recommended slandered and the number 232 specifies the latest version.There are various types of serial communication systems were designed to transfer the information over large distances through some variety of information cable. The term serial most frequently denoted to the RS232 port which is called as the serial port, and therefore the several devices designed to be compatible with it using serial cable which is plugged into it. Basically, all long distance communication transfers the information one bit at a time, instead of in parallel, as a result of it reduces the price of the cable. In telecommunications, this RS232 port is a standard serial communication transmission of data. It formally describes the signals connecting between a data terminal equipment (DTE) and a data circuit terminating equipment( DCE). Here, DTE is a computer terminal and DCE is a modem. This article gives a brief information about the fundamentals of RS232 communication.
Fundamentals of RS232 Communication
The fundamentals of RS232 communication mainly involves what is RS232, pin configuration of RS232 and its interfacing to the micorocntroller using MAX232
What is RS232?
The RS232 is a communication cable, generally used to transfer and receive the serial data between two devices This cable supports both synchronous and asynchronous data transmissions. RS 232 cable is used in many devices in the industries and it is used to find the difference between two signal levels like logic 0 and logic 1. The logic 0 is denoted with the +12V and logic 1 is denoted with the -12V. This cable works at different baud rates, such as 4,800 bits/sec and 9,600 bits/sec. The RS232 consists of two terminal devices, namely DTE and DCE. These two devices sends and receives the signals. In present days, most of the PCs include two serial ports and one parallel port. These ports are used to communicate with external devices.
A serial port sends and receives data one bit at a time over one wire very slowly. In the same way the parallel port also sends and receives the data over eight separate wires, and these ports are generally used to connect a printer to a personal computer. The most of the serial cable connectors are DB-9 (9-pin connector) and B-25 (25-pin connector). These cables may be male or female type. Nowadays, most of the PCs use DB9 cable for the exchange of asynchronous data. The maximum size of RS232 cable is 50feet.
RS232 Pin Configuration
RS 232 consists of 25 pins and the main function of each pin is discussed below.
- Pin1 is a ground pin
- Pin2 is a transmit data pin, which is used to transmit the data
- Pin3 is a receive data pin, which is used to receive the data.
- Pin4 is a request to send pin
- Pin5 is clear to send pin
- Pin6 is data set ready pin
- Pin7 is the common reference pin for all signals which includes timing, data and control signals. The DTE & DCE work accurately, across the serial interface.
- Pin8 is also called as carrier detector or received line signal. This signal is triggered when a appropriate carrier is recognized b/n the local and & remote DCE devices.
- Pin9 is DTE serial connector, this signal tracks the incoming ring to an extent. Usually this signal is used by DCE auto answer mode.
- Pin10 is a test pin
- Pin11 is a standby select pin
- Pin12 is a data carrier detect pin
- Pin13 is a clear to send pin
- Pin14 is a data transmit pin
- Pin15 is a transmit clock pin
- PIN 16 is a Receive data pin
- PIN 17 is a Receive clock.
- PIN 18 is a Test Pin.
- PIN 19 is a Request to send pin
- PIN 20 is a Data terminal Ready pin.
- PIN 21 is a Signal Quality Detector pin, that Specifies the value of the received carrier signal because at each bit time, the transmitting modem must be sent 0 or either 1, the modem regulates the bit timing from the DTE.
- Pin22 is a ring indicator which means the DCE advises the DTE that the phone is ringing.
- PIN 23 pin is a data signal rate detector
- PIN 24 is an external clock pin.
RS232 Interfacing to Microcontroller using Max 232
The block diagram of RS232 interfacing with the microcontroller using MAX232 is shown above.In this, MAX 232 acts as a buffer driver for the processor. It receives the typical logic values of 0 and 5 volts and alters them to the RS232 standard of +10 and -10v. Some Microcontrollers are built in serial ports which permit for direct connection with the RS232 serial port of the computer. However, many microcontrollers give a 0 to 5volts o/p and need an intermediate buffer to convert the volts from 0 to 5v to +10 and -10 volts required by the RS232.
The IC MAX232 comprises of a transmitter – receiver arrangement so that two serial ports can be connected using the IC. Capoacitors-5 and each 1 microFarad are used to generate the necessary RS232 voltage from the TTL/CMOS voltage. The transmitter section converts the TTL level to RS232 level, and the receiver section receives the input of the RS232 and converts them to TTL level.
Basically, it is a 16-pin IC where the transmitter pins are connected to the microcontroller and the input of the transmitter pin gets TTL i/p from the microcontroller and the o/p of the transmitter pin supply o/p to the RS232 port. The receiver pins attach to the RS 232 port such that the receiver’s i/p receives RS232 input from the personal computer port and the o/p receiver pin supplies the TTL i/p to the microcontroller.So, the transmitter receives I/p from the microcontroller and gives o/p to the RS232 port while the receiver takes i/p from the RS232 port and gives o/p to the microcontroller.
The remaining pins are connected to the five electrolyte capacitors such that one of the capacitor is used as a voltage doubler to acquire +10V from 5V and another capacitor is used as a voltage inverter to acquire -10v. The remaining three capacitors are used as bypass capacitors for V+, V- and Vcc. Therefore, the capacitors act as a voltage regulator. The main advantage of MAX 23 is, it operates with 5v, that permits for a single 5v supply to be used for both the microcontroller and the IC (integrated circuit).
Thus, this is all about fundamentals of RS232 communication which includes what is RS232 protocol, pin diagram of RS232 and RS 232 interface. We hope that you have got a better understanding of this concept. Furthermore, any queries regarding this concept, please give your feedback in the comment section below. Here is a question for you, What is the logic and voltage levels of RS232?