Вы находитесь на странице: 1из 9

What is the Difference Between RS232, RS422, and RS485 Converters?

While to an electronic data communications engineer or specialist, the difference between RS232, RS422 and RS485 is clear as day, to the rest of us they are just some ancient industry standards that have probably all been replaced by USB anyway. Or at least you can use a converter to deal with them. The latter is true, but the former really isn't: those standards are very much alive and continue to be used in a wide variety of applications. But let's take a look at the backgrounds of those standards. RS-232, a standard of the Electronics Industries Association (EIA), has been around for over four decades. It goes back to the days where remote Teletype machines were connected to mainframes via modems. Communication between those DTE (Data Terminal Equipment) machines and DCE (Data Circuitterminating Equipment) happened sequentially, one bit at a time. It was all slow and quite mechanical, with different voltage levels compared to ground, representing binary system ones and zeros. Serial communication is quite simple, but early on manufacturers experimented with various control signals, pin layouts and proprietary methods. With RS232, the EIA established a standard that minimized incompatibilities and made life a lot easier for information technology departments and anyone else involved with data communication. RS232 turned out to be a very enduring standard that remained a primary means of data communication until the mid-1990s, and it is still being used today. There are, however, some inherent shortcomings and limitations to RS232, primarily in the areas of speed, reliability and flow control. The RS422 standard addresses some of those issues with two sets of twisted pairs that carry negative and positive voltages. The RS-422 standard offers speeds up to 10 megabits per second and the maximum connection distance is 4,000 feet. In addition, since it uses two twisted pairs, with RS-422 you can communicate in both directions simultaneously. However, RS-422 also has an important limitation: it is still a point-to-point protocol and therefore unsuitable for many multi-drop applications. This is where RS-485

comes in. RS-485 works very much like RS422 in terms of speed and distance, also using twisted pairs and voltage differentials for serial binary data communication. However, unlike with RS-422, with RS485 devices are addressable (like in Ethernet) and therefore can communicate with multiple nodes (up to 32). RS-485 is therefore suitable for a variety of master/slave architecture connections and networks. With more addressable devices and each device being able to communicate bidirectionally, line termination becomes an issue and requires special consideration. What it all boils down to is that these older serial communication standards are still being used. USB may have largely replaced RS232 serial connectivity in consumer products, but in many industrial and commercial systems, serial data communication remains very much alive. Which means that anyone dealing with serial communication products and systems will need not only an understanding of the standards and principles behind the standards, but also a tool chest of serial data converter products. That includes RS-232, RS-422 and RS-485, but also TTL and fiber optics converters and adapters.

What is TTL and How Does it Relate to RS232?


Most people who are at least somewhat technically inclined know what USB, Ethernet and RS232 are and perhaps even how they work. A good percentage of them also know of RS422 and RS485 and how those standards relate to RS232. Many have used converters when dealing with those serial standards. What's amazing is that comparatively few know what TTL stands for, and what is meant by TTL communication and TTL devices. To be honest, unless you're an electrical engineer or hobbyist, information on TTL is not that easy to come by. If you look it up you actually find two definitions for TTL, both referring to data communication. One is "Time to Live" and refers to a data field in the Internet Protocol that indicates how many more hops a data packet will travel on the Internet before it is returned or discarded. A second one, and the one we're interested in, is "Transistor-Transistor Logic" but even that requires extra

explanation. Transistor-Transistor Logic, or TTL, refers to a way of constructing digital circuits. It was invented in the early 1960s when first Sylvania and then Texas Instruments created TTL-based integrated circuits. In TTL circuits, there are two transistors responsible for driving chip output, one of them generating the logical zero and the other the logical one. With TTL, a logical "zero" is defined as ground (or usually 0 to 0.4 Volts), and a logic "one" as plus 5 Volt. That made a lot of sense since it is simple and microcontrollers are usually run on a single supply voltage. RS232, on the other hand, defines a logic "zero" as larger than plus three Volts and a logic "one" as less than minus 3 Volt. Voltages around zero, which is usually ground, are not considered a signal at all. Why use positive and negative voltages when circuits are natively generating either a voltage or no voltage? Because signal degradation and interference are much more likely to render a TTL signal unusable than a RS-232 signal where a "one" is very clearly negative and a "zero" very clearly positive. This means that TTL signals are generally used for fast communication within a device whereas RS232 signals are used for slower external connections over longer distances. Do note that there is a difference between actual TTL circuits, and using the term "TTL" to simply refer to the voltage levels used for communication. "TTL" communication can happen without any actual TTL circuits or devices present. Anyway, you can see the difference between TTL and RS232 now: one is based on signals generated by a certain type of integrated circuit, the other refers to signals that are specifically defined for reliable data communication. Equally clear should be the need for a converter when you're dealing with both standards. Voltages need to be properly "translated" between the standards. More precisely, signals ranging from ground to 5 Volts must be translated into signals that can be up to plus or minus 10 Volts. That requires additional power sources and voltage inverter circuitry. Modern converters usually don't need an external power supply as they are powered by the RS232 data lines themselves. Also note that serial to TTL adapters are available between RS232 and TTL as well as RS485 to TTL, and that TTL devices can be 3.3 Volt or 5 Volt, so make sure you get the proper converter.

RS232 / RS422 / RS485 DB9 & DB25 serial port pinouts and loopback wiring
DE-9 (DB9) Connector
The DE-9 connector is the most common serial connector. This connector is found on National Instruments one and two port serial interfaces.

Figure 1: Pinout diagram for DE-9 Connector To perform a loopback test with no hardware flow control, you will need to connect pins 2 and 3 for RS-232 and pins 4 to 8 and 5 to 9 for RS-422/485. These connections can be seen in redbelow (figure 2 for RS-232 and figure 3 for RS-422/485). When using hardware flow control, you will need to connect pins 4 to 6 and 7 to 8 for RS-232. Pins 7 and 8 are used for RTS/CTS hardware flow control where pins 4 and 6 are used for DTR/DSR hardware flow control. For RS-422/485, you will need to connect pins 2 to 3 and 6 to 7. Both of these connections are required for RTS/CTS hardware flow control since RS-422/485 have differential connections. These connections can be seen in blue below (figure 2 for RS-232 and figure 3 for RS-422/485).

Figure 2: RS-232 female DE-9 plug with connections required for loopback test

Figure 3: RS-422/485 female DE-9 plug with connections required for loopback test

DB-25 Connector
This connector is not as common as the DE-9 connector. This connector can still be used to perform a loopback test with a method similar to the one used for the DE-9 connector.

Figure 4: Pinout diagram for DB-25 Connector Most of the pins on DB-25 connectors are not connected since only nine pins are used for RS-232, RS-422, and RS-485 communication. To perform a loopback test with no hardware flow control with a DB-25 connector, connect pins 2 to 3 for RS-232. For RS-422/485 connect pins 5 to 20 and 7 to 22. The required connections can be seen in red on figures 5 and 6. For hardware flow control using RS-232, pins 4 and 5 must be connected along

with pins 6 and 20. When using RS-422/485, pin 5 must connect to pin 20 and pin 7 must connect to pin 22. This will allow the loopback test to use the proper flow control lines. These connections can be seen in blue on figures 5 and 6.

Figure 5: RS-232 female DB-25 plug with connections required for loopback test

Figure 6: RS-422/485 female DB-25 plug with connections required for loopback test

10P10C (RJ50) Connector


This connector is most commonly found on National Instruments 4 port serial interfaces. The National Instrument 4 port serial interfaces come with 4 10P10C to DE-9 male converter cables.

Figure 7: Pinout diagram for RJ50 Connector It is not recommended to use the 10P10C connector by itself to perform a loopback test due to the small separation between pins. Using a 10P10C to DE-9 connector (Part Number 192190-01), a looback test can be performed using the methods described above.

Вам также может понравиться