Reference Links:
http://www.lammertbies.nl/comm/info/RS-485.html
http://www.interworldna.com/accesio/serial/usb-232-422485.html
http://digital.ni.com/public.nsf/allkb/B9A38929D546B796862572C7005F0644
http://www.arcelect.com/485info.htm
RS-232 is the single ended serial protocol and RS-485 and RS-422 are differential serial protocol. The pinout for RS-232, RS-422 and RS-485 is shown below figure.
A loopback test is a test in which a signal in sent from a communications device and returned (looped back) to it as a way to determine whether the device is working right. The figures below will show you what pins you need to connect to perform loopback test on RS-232 and RS-422/RS-485 respectively.
RS-232
RS-422 and RS-485
RS485 will support 32 drivers and 32 receivers (we are talking about bi-directional - half duplex - multi-drop communications over a single or dual twisted pair cable !!). An RS-485 network can be connected in a 2 or 4 wire mode. Maximum cable length can be as much as 4000 feet because of the differential voltage transmission system used. The typical use for RS485 is a single PC connected to several addressable devices that share the same cable. You can think of RS485 as a "party-lined" communications system (the addressing is handled by the Remote Computer unit). The RS232 may be converted to RS485 with a simple interface converter - it can have optical isolation and surge suppression.
RS232 is an interface to connect one DTE, data terminal equipment to one DCE, data communication equipment at a maximum speed of 20 kbps with a maximum cable length of 50 feet. This was sufficient in the old days where almost all computer equipment were connected using modems, but soon after people started to look for interfaces capable of one or more of the following:
http://www.lammertbies.nl/comm/info/RS-485.html
http://www.interworldna.com/accesio/serial/usb-232-422485.html
http://digital.ni.com/public.nsf/allkb/B9A38929D546B796862572C7005F0644
http://www.arcelect.com/485info.htm
RS-232 is the single ended serial protocol and RS-485 and RS-422 are differential serial protocol. The pinout for RS-232, RS-422 and RS-485 is shown below figure.
RS-232
RS-422 and RS-485
RS485 will support 32 drivers and 32 receivers (we are talking about bi-directional - half duplex - multi-drop communications over a single or dual twisted pair cable !!). An RS-485 network can be connected in a 2 or 4 wire mode. Maximum cable length can be as much as 4000 feet because of the differential voltage transmission system used. The typical use for RS485 is a single PC connected to several addressable devices that share the same cable. You can think of RS485 as a "party-lined" communications system (the addressing is handled by the Remote Computer unit). The RS232 may be converted to RS485 with a simple interface converter - it can have optical isolation and surge suppression.
RS232 is an interface to connect one DTE, data terminal equipment to one DCE, data communication equipment at a maximum speed of 20 kbps with a maximum cable length of 50 feet. This was sufficient in the old days where almost all computer equipment were connected using modems, but soon after people started to look for interfaces capable of one or more of the following:
- Connect DTE's directly without the need of modems
- Connect several DTE's in a network structure
- Ability to communicate over longer distances
- Ability to communicate at faster communication rates
RS485 is the most versatile communication standard in the standard series defined by the EIA, as it performs well on all four points. That is why RS485 is currently a widely used communication interface in data acquisition and control applications where multiple nodes communicate with each other.
RS485 functionality
Default, all the senders on the RS485 bus are in tri-state with high impedance. In most higher level protocols, one of the nodes is defined as a master which sends queries or commands over the RS485 bus. All other nodes receive these data. Depending of the information in the sent data, zero or more nodes on the line respond to the master. In this situation, bandwidth can be used for almost 100%. There are other implementations of RS485 networks where every node can start a data session on its own. This is comparable with the way ethernet networks function. Because there is a chance of data collosion with this implementation, theory tells us that in this case only 37% of the bandwidth will be effectively used. With such an implementation of a RS485 network it is necessary that there is error detection implemented in the higher level protocol to detect the data corruption and resend the information at a later time.
There is no need for the senders to explicity turn the RS485 driver on or off. RS485 drivers automatically return to their high impedance tri-state within a few microseconds after the data has been sent. Therefore it is not needed to have delays between the data packets on the RS485 bus.