Serial Communication in Embedded Systems
What is Serial Communication?
Serial data communication is the most common low-level protocol for communicating between two or more devices. Normally, one device is a computer, while the other device can be a modem, a printer, another computer, or a scientific instrument such as an oscilloscope or a function generator.
As the name suggests, the serial port sends and receives bytes of information, rather characters (used in the other modes of communication), in a serial fashion - one bit at a time. These bytes are transmitted using either a binary (numerical) format or a text format.
Serial data communication is the most common low-level protocol for communicating between two or more devices. Normally, one device is a computer, while the other device can be a modem, a printer, another computer, or a scientific instrument such as an oscilloscope or a function generator.
As the name suggests, the serial port sends and receives bytes of information, rather characters (used in the other modes of communication), in a serial fashion - one bit at a time. These bytes are transmitted using either a binary (numerical) format or a text format.
RS-232
This is the original serial port interface “standard” and it stands for “Recommended Standard Number 232” or more appropriately EIA Recommended Standard 232 is the oldest and the most popular serial communication standard. It was first introduced in 1962 to help ensure connectivity and compatibility across manufacturers for simple serial data communications.
The Standard
Maximum Bit Transfer Rate, Signal Voltages and Cable Length
Baud Rate.
Disadvantage
Being a single-ended system it is more susceptible to induced noise, ground loops and ground shifts
This is the original serial port interface “standard” and it stands for “Recommended Standard Number 232” or more appropriately EIA Recommended Standard 232 is the oldest and the most popular serial communication standard. It was first introduced in 1962 to help ensure connectivity and compatibility across manufacturers for simple serial data communications.
- RS-232 is designed for a unidirectional half-duplex communications mode. That simply means that a transmitter (driver) is feeding the data to a receiver over a copper line. The data always follows the direction from driver to receiver over that line. If return transmission is desired, another set of driver- receiver pair and separate wires are needed. In other words, if bi-directional or full-duplex capabilities are needed, two separate communications paths are required.
- Devices that require the RS-232 IC have to be very small, have low current drain, operate from a +3 to +5-V supply.
- The maximum bit transfer rate capability and cable length.
- Communication Technique: names, electrical characteristics and functions of signals.
- The mechanical connections and pin assignments.
The Standard
Maximum Bit Transfer Rate, Signal Voltages and Cable Length
- RS-232’s capabilities range from the original slow data rate of up to 20 kbps to over 1 Mbps for some of the modern applications.
- RS-232 is mainly intended for short cable runs, or local data transfers in a range up to 50 feet maximum, but it must be mentioned here that it also depends on the
Baud Rate.
- It is a robust interface with speeds to 115,200 baud, and
- It can withstand a short circuit between any 2 pins.
- It can handle signal voltages as high / low as ±15 volts.
- Peripheral connectivity for PCs (the PC COM port hardware), which can range beyond modems and printers to many different handheld devices and modern scientific instruments.
Disadvantage
Being a single-ended system it is more susceptible to induced noise, ground loops and ground shifts
RS-422 and RS-423
These were designed, specifically; to overcome the distance and speed limitations of RS-232.Although they are similar to the more advanced RS-232C, but can accommodate higher baud rates and longer cable lengths and, accommodate multiple receivers.
Maximum Bit Transfer Rate, Signal Voltages and Cable Length
This fits well in process control applications in which instructions are sent out to many actuators or responders. Ground voltage differences can occur in electrically noisy environments where heavy electrical machinery is operating.
Maximum Bit Transfer Rate, Signal Voltages and Cable Length
- For both of these standards the data lines can be up to 4,000 feet with a data rate around 100 kbps.
- The maximum data rate is around 10 Mbps for short runs, trading off distance for speed.
- The maximum signal voltage levels are ±6 volts.
- The signaling technique for the RS-422 and RS-423 is mainly responsible for there superiority over RS-232 in terms of speed and length of transmission as explained in the next subsection.
This fits well in process control applications in which instructions are sent out to many actuators or responders. Ground voltage differences can occur in electrically noisy environments where heavy electrical machinery is operating.
RS-485
This is an improved RS-422 with the capability of connecting a number of devices (transceivers) on one serial bus to form a network.
Maximum Bit Transfer Rate, Signal Voltages and Cable Length
Maximum Bit Transfer Rate, Signal Voltages and Cable Length
- Such a network can have a "daisy chain" topology where each device is connected to two other devices except for the devices on the ends.
- Only one device may drive data onto the bus at a time. The standard does not specify the rules for deciding who transmits and when on such a network. That solely depends upon the system designer to define.
- Variable data rates are available for this standards but the standard max. data rate is 10 Mbps, however ,some manufacturers do offer up to double the standard range i.e. around 20 Mbps,but of course, it is at the expense of cable width.
- It can connect upto 32 drivers and receivers in fully differential mode similar to the RS – 422
- Among all of the asynchronous standards mentioned above this standard offers the maximum data rate.
- Apart from that special hardware for avoiding bus contention and ,
- A higher receiver input impedance with lower Driver load impedances are its other assets.