rs232 To rs485
rs232 To rs485
Precision
Measurement Central (4)
Part 4: RS485, or networking the MSC1210 micro
Design by J. Wickenhäuser www.wickenhaeuser.com
The RS485 port on the MSC1210 board provides great opportunities for
communication with other systems. For example, it allows a number of
MSC1210 boards to be connected up into a network and talk to one
another over distances of several kilometres.
RS485
Although the RS485 interface has been
around virtually since the earliest days of the the two wires designated ‘A’ and ‘B’ OUT over a long cable. An oscillo-
PC era, it is rarely seen in real life, that is, on are required, although it is recom- scope is connected to the bus at the
the PC’s connector panel. That’s why we take mended to implement potential can- indicated position. Any cable will
this opportunity to present a suitable con- cellation using a third wire and an have a more or less distinctive
verter for RS232 to RS485, which has been tai- optional resistor. Another popular impedance — values of 60 to 200 Ω
lored for use in combination with the variant has four wires and allows the being typical. The signal on the
MSC1210 board. First, however, we need to devices to be powered over the bus. cable will remain undistorted only if
wade though some theory. The digital information conveyed the cable is terminated with a resis-
over the RS485 bus comprises the tor whose value is approximately
Bus topology voltage difference between line ‘A’ equal to the cable impedance. Wrong
Normally an RS485 network consists of a long and ‘B’. If the difference is positive, termination values cause signal dis-
cable (bus) of which the ends are terminated the bus is said to convey a logic 1. In tortion that can lead to data corrup-
with resistors. Up to 32 devices may be con- the other case, a logic 0 is conveyed. tion and increased susceptibility of
nected to the bus, or even 256 if a suitable The use of differential voltages the bus to noise.
driver chip is used. Ideally, all devices are makes the bus rather immune to Fortunately, correct cable termi-
connected to form a long thread. In practice, noise, provided a number of condi- nation is really critical only in those
however, individual bus participants may tions are satisfied. Figure 2 shows a cases where signals with a high
also be connected via branches of several bus with two devices on it, where data rate (> 57,600 bits/s) are con-
metres (Figure 1). In ‘minimum’ cases only the signal is to be carried from IN to veyed over cable lengths exceeding
TXD
TX 4 D B to cause problems with long cables.
A better alternative is shown in Figure 4.
5
In this configuration, the initial level of the
bus is not known. If a device wants to put a
+5V Device Device Device to individual Device data block on the bus, it has to activate its
devices <10m
#1 #2 #3 #x
transmitter section first. However, as a result
of improper termination as illustrated in Fig-
560Ω
ure 2, it may happen that activation of the
default level
transmitter alone is sufficient for receiving
ZI (120Ω) ZI (120Ω)
optionally
2 x 560Ω devices on the bus to recognise data, when
in fact no valid data has been sent as yet (see
optionally 0–100Ω
560Ω to ground block marked ???).
This leads to the absolute requirement for
length up to 4 km at 115.2 kbits/s a pause to be inserted immediately after acti-
030060 - 4 - 12
vation of each transmitter section. This ‘dead’
period needs to be much longer than pre-
Figure 1. RS485 topology. scribed for the transmission of a single byte
(t_byte). The time needed to convey a byte
over the bus is roughly ten times the recipro-
500 m, when the propagation times enough, but longish cables in partic- cal of the baud rate, or about 1 ms per byte
start to approach the bit rates (the ular are prone to pick up (by induc- when a rate of 9,600 bits/s is used.
signal travels 100-300 m in 1 µs). tion) much higher peak voltages The data packet proper always starts with
With cable lengths under 50 m and caused by electrostatic fields, dis- a special marker byte (START). Note, how-
bit rates under 57,600, a cheap cable charges, EMI transients and so on. ever, that START may never occur within the
with no specified impedance but ter- Consequently it makes sense to pro- actual data (more about this in the next
minated with 120 Ω at both ends tect all RS485 against voltage surges. instalment).
should be adequate. With suitable protection, short and Because only one device can transmit at a
not too powerful transients can not time (‘half duplex’) a strict protocol is needed
Overvoltage Protection ‘lite’ harm the drivers ICs (Figure 3). describing who’s allowed to transmit what
An RS485 driver must be capable of and when. If the protocol is not observed,
withstanding line voltages between Data traffic data contention, collision and corruption is
–7 V and +12 V at its input(s). Fair The drawing in Figure 1 includes all imminent. The practical application dis-
oscilloscope
50Ω B
transmitter receiver
device GND
RS485 (not network!)
030060 - 4 - 14
030060 - 4 - 13
IC3
+5V +5V 7805 D1
1N4001
C2 16
C11 C9 C12 C10
IC4
100n 8
10µ 100n 100n 10µ
16V 35V
C6
10µ
7
D6 D7 C7
S1.2
16V PullUp
2
RECEIVE READY/TRANSMIT 100n
V+ 2
1 16
K1 C5 C1+ R6 R7 IC2 R4
8 5 K2
560Ω
1k
1k
S1.4
120Ω
MAX232 GND
9 100n
RI 10µ 5 15
8
C2– 5
16V V- LTC485
S1.1
SUB-D9 R2 R1 PullDn.
22k
220k
220n
15 14 7 6
RX/CX CX RX/CX CX
1 13 9 5
2 & 10 & IC4 = 74HCT123
3 IC4.A 4 11 IC4.B 12
+5V
030060 - 4 - 11
non reflected
030060-4
reflected
SN65176B, SN75176B
DIFFERENTIAL BUS TRANSCEIVERS
SLLS101B – JULY 1985 – REVISED JUNE 1999
description
The SN65176B and SN75176B differential bus transceivers are monolithic integrated circuits designed for
bidirectional data communication on multipoint bus transmission lines. They are designed for balanced
transmission lines and meet ANSI Standards TIA/EIA-422-B and TIA/EIA-485-A and ITU Recommendations
V.11 and X.27.
The SN65176B and SN75176B combine a 3-state differential line driver and a differential input line receiver,
both of which operate from a single 5-V power supply. The driver and receiver have active-high and active-low
enables, respectively, that can be connected together externally to function as a direction control. The driver
differential outputs and the receiver differential inputs are connected internally to form differential input/output
(I/O) bus ports that are designed to offer minimum loading to the bus when the driver is disabled or VCC = 0.
These ports feature wide positive and negative common-mode voltage ranges, making the device suitable for
party-line applications.
The driver is designed for up to 60 mA of sink or source current. The driver features positive and negative current
limiting and thermal shutdown for protection from line-fault conditions. Thermal shutdown is designed to occur
at a junction temperature of approximately 150°C. The receiver features a minimum input impedance of 12 kΩ,
an input sensitivity of ± 200 mV, and a typical input hysteresis of 50 mV.
The SN65176B and SN75176B can be used in transmission-line applications employing the SN75172 and
SN75174 quadruple differential line drivers and SN75173 and SN75175 quadruple differential line receivers.
The SN65176B is characterized for operation from – 40°C to 105°C and the SN75176B is characterized for
operation from 0°C to 70°C.
Please be aware that an important notice concerning availability, standard warranty, and use in critical applications of
Texas Instruments semiconductor products and disclaimers thereto appears at the end of this data sheet.
PRODUCTION DATA information is current as of publication date. Copyright 1999, Texas Instruments Incorporated
Products conform to specifications per the terms of Texas Instruments
standard warranty. Production processing does not necessarily include
testing of all parameters.
Function Tables
DRIVER
INPUT ENABLE OUTPUTS
D DE A B
H H H L
L H L H
X L Z Z
RECEIVER
DIFFERENTIAL INPUTS ENABLE OUTPUT
A–B RE R
VID ≥ 0.2 V L H
– 0.2 V < VID < 0.2 V L ?
VID ≤ – 0.2 V L L
X H Z
Open L ?
H = high level, L = low level, ? = indeterminate,
X = irrelevant, Z = high impedance (off)
3
3 DE
DE EN1
2 4
RE EN2 D
2
RE
6 6
4 1 A 1 A
D 7 R 7 Bus
1 B B
1
R 2
EQUIVALENT OF EACH INPUT TYPICAL OF A AND B I/O PORTS TYPICAL OF RECEIVER OUTPUT
16.8 kΩ 960 Ω
Input NOM NOM
960 Ω
NOM Output
GND
Driver input: R(eq) = 3 kΩ NOM Input/Output
Enable inputs: R(eq )= 8 kΩ NOM Port
R(eq) = equivalent resistor
absolute maximum ratings over operating free-air temperature range (unless otherwise noted)†
Supply voltage, VCC (see Note 1) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 V
Voltage range at any bus terminal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . – 10 V to 15 V
Enable input voltage, VI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.5 V
Package thermal impedance, θJA (see Note 2): D package . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197°C/W
P package . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104°C/W
Lead temperature 1,6 mm (1/16 inch) from case for 10 seconds . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 260°C
Storage temperature range, Tstg . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . – 65°C to 150°C
† Stresses beyond those listed under “absolute maximum ratings” may cause permanent damage to the device. These are stress ratings only, and
functional operation of the device at these or any other conditions beyond those indicated under “recommended operating conditions” is not
implied. Exposure to absolute-maximum-rated conditions for extended periods may affect device reliability.
NOTES: 1. All voltage values, except differential input/output bus voltage, are with respect to network ground terminal.
2. The package thermal impedance is calculated in accordance with JESD 51, except for through-hole packages, which use a trace
length of zero.
DRIVER SECTION
electrical characteristics over recommended ranges of supply voltage and operating free-air
temperature (unless otherwise noted)
PARAMETER TEST CONDITIONS† MIN TYP‡ MAX UNIT
VIK Input clamp voltage II = – 18 mA – 1.5 V
VO Output voltage IO = 0 0 6 V
|VOD1| Differential output voltage IO = 0 1.5 3.6 6 V
1/2 VOD1
RL = 100 Ω, See Figure 1 V
|VOD2| g
Differential output voltage or 2¶
RL = 54 Ω, See Figure 1 1.5 2.5 5 V
VOD3 Differential output voltage See Note 4 1.5 5 V
Change
g in magnitude
g of differential output
∆|VOD| ± 0.2
02 V
voltage§
+3
VOC Common mode output voltage
Common-mode RL = 54 Ω or 100 Ω
Ω, See Figure 1 V
–1
Change
g in magnitude
g of common-mode
∆|VOC| ± 0.2
02 V
output voltage§
Output disabled,, VO = 12 V 1
IO Output current mA
See Note 5 VO = – 7 V – 0.8
IIH High-level input current VI = 2.4 V 20 µA
IIL Low-level input current VI = 0.4 V – 400 µA
VO = – 7 V – 250
VO = 0 150
IOS Short circuit output current
Short-circuit mA
VO = VCC 250
VO = 12 V 250
Outputs enabled 42 70
ICC Supply current (total package) No load mA
Outputs disabled 26 35
† The power-off measurement in ANSI Standard TIA/EIA-422-B applies to disabled outputs only and is not applied to combined inputs and outputs.
‡ All typical values are at VCC = 5 V and TA = 25°C.
§ ∆|VOD| and ∆|VOC| are the changes in magnitude of VOD and VOC, respectively, that occur when the input is changed from a high level to a low
level.
¶ The minimum VOD2 with a 100-Ω load is either 1/2 VOD1 or 2 V, whichever is greater.
NOTES: 4. See ANSI Standard TIA/EIA-485-A, Figure 3.5, Test Termination Measurement 2.
5. This applies for both power on and off; refer to ANSI Standard TIA/EIA-485-A for exact conditions. The TIA/EIA-422-B limit does
not apply for a combined driver and receiver terminal.
SYMBOL EQUIVALENTS
DATA-SHEET PARAMETER TIA/EIA-422-B TIA/EIA-485-A
VO Voa, Vob Voa, Vob
|VOD1| Vo Vo
|VOD2| Vt (RL = 100 Ω) Vt (RL = 54 Ω)
(
Vt (Test Termination
|VOD3|
Measurement 2)
∆|VOD| | |Vt| – |Vt| | | |Vt – |Vt| |
VOC |Vos| |Vos|
∆|VOC| |Vos – Vos| |Vos – Vos|
IOS |Isa|, |Isb|
IO |Ixa|, |Ixb| Iia, Iib
RECEIVER SECTION
RL VID
2 VOH
VOD2
+IOL – IOH
RL VOL
VOC
2
Figure 1. Driver VOD and VOC Figure 2. Receiver VOH and VOL
3V
Input 1.5 V 1.5 V
CL = 50 pF 0V
(see Note A)
RL = 54 Ω
Generator td(OD) td(OD)
50 Ω Output
(see Note B)
90% ≈ 2.5 V
Output 50% 50%
3V 10% 10%
≈ – 2.5 V
tt(OD) tt(OD)
TEST CIRCUIT VOLTAGE WAVEFORMS
Output 3V
S1 Input 1.5 V 1.5 V
0 V or 3 V 0V
tPZH 0.5 V
CL = 50 pF RL = 110 Ω VOH
Generator (see Note A)
(see Note B) 50 Ω Output 2.3 V
tPHZ Voff ≈ 0 V
5V
3V
Input 1.5 V 1.5 V
RL = 110 Ω
S1 0V
Output
3 V or 0 V
tPZL tPLZ
CL = 50 pF
(see Note A) 5V
Generator
50 Ω 2.3 V 0.5 V
(see Note B) Output
VOL
3V
Output Input 1.5 V 1.5 V
Generator
(see Note B) 51 Ω
0V
1.5 V
CL = 15 pF tPLH tPHL
(see Note A) VOH
0V
Output 1.3 V 1.3 V
VOL
TEST CIRCUIT VOLTAGE WAVEFORMS
1.5 V S1
2 kΩ S2
–1.5 V 5V
CL = 15 pF 5 kΩ 1N916 or Equivalent
(see Note A)
Generator
(see Note B) 50 Ω
S3
TEST CIRCUIT
3V 3V
Input 1.5 V Input 1.5 V
S1 to 1.5 V S1 to –1.5 V
0V S2 Open 0V S2 Closed
tPZH S3 Closed S3 Open
tPZL
VOH
1.5 V ≈ 4.5 V
Output
Output 1.5 V
0V
VOL
3V 3V
S1 to 1.5 V S1 to – 1.5 V
Input 1.5 V S2 Closed Input 1.5 V S2 Closed
S3 Closed S3 Closed
0V 0V
tPHZ
tPLZ
VOH ≈ 1.3 V
0.5 V
Output Output 0.5 V
≈ 1.3 V VOL
VOLTAGE WAVEFORMS
TYPICAL CHARACTERISTICS
DRIVER DRIVER
HIGH-LEVEL OUTPUT VOLTAGE LOW-LEVEL OUTPUT VOLTAGE
vs vs
HIGH-LEVEL OUTPUT CURRENT LOW-LEVEL OUTPUT CURRENT
5 5
VCC = 5 V VCC = 5 V
4.5 TA = 25°C 4.5 TA = 25°C
VOH – High-Level Output Voltage – V
3.5 3.5
3 3
2.5 2.5
2 2
1.5 1.5
VOH
1 1
0.5 0.5
0 0
0 – 20 – 40 – 60 – 80 – 100 – 120 0 20 40 60 80 100 120
IOH – High-Level Output Current – mA IOL – Low-Level Output Current – mA
Figure 8 Figure 9
DRIVER
DIFFERENTIAL OUTPUT VOLTAGE
vs
OUTPUT CURRENT
4
VCC = 5 V
3.5 TA = 25°C
VOD – Differential Output Voltage – V
2.5
1.5
1
VOD
0.5
0
0 10 20 30 40 50 60 70 80 90 100
IO – Output Current – mA
Figure 10
TYPICAL CHARACTERISTICS
RECEIVER
HIGH-LEVEL OUTPUT VOLTAGE
RECEIVER vs
HIGH-LEVEL OUTPUT VOLTAGE FREE-AIR TEMPERATURE†
vs
HIGH-LEVEL OUTPUT CURRENT 5
VCC = 5 V
5 4.5
VID = 200 mV
4 3.5
3.5 3
3 2.5
2.5 2
VCC = 5.25 V
2 VCC = 5 V 1.5
1.5 1
VCC = 4.75 V
VOH
1 0.5
VOH
0.5 0
– 40 – 20 0 20 40 60 80 100 120
0 TA – Free-Air Temperature – °C
0 – 5 – 10 – 15 – 20 – 25 – 30 – 35 – 40 – 45 – 50
IOH – High-Level Output Current – mA † Only the 0°C to 70°C portion of the curve applies to the
SN75176B.
Figure 11 Figure 12
RECEIVER RECEIVER
LOW-LEVEL OUTPUT VOLTAGE LOW-LEVEL OUTPUT VOLTAGE
vs vs
LOW-LEVEL OUTPUT CURRENT FREE-AIR TEMPERATURE
0.6 0.6
VCC = 5 V VCC = 5 V
TA = 25°C VID = – 200 mV
VOL – Low-Level Output Voltage – V
0.4 0.4
0.3 0.3
0.2 0.2
VOL
VOL
0.1 0.1
0 0
0 5 10 15 20 25 30 – 40 – 20 0 20 40 60 80 100 120
IOL – Low-Level Output Current – mA TA – Free-Air Temperature – °C
Figure 13 Figure 14
TYPICAL CHARACTERISTICS
RECEIVER RECEIVER
OUTPUT VOLTAGE OUTPUT VOLTAGE
vs vs
ENABLE VOLTAGE ENABLE VOLTAGE
5 6
VID = 0.2 V VID = – 0.2 V
VCC = 5.25 V
Load = 8 kΩ to GND Load = 1 kΩ to VCC
TA = 25°C 5 TA = 25°C
4 VCC = 5.25 V
VCC = 4.75 V
VO – Output Voltage – V
VCC = 5 V
VO – Output Voltage – V
4
VCC = 5 V
3 VCC = 4.75 V
2
2
VO
VO
1
1
0 0
0 0.5 1 1.5 2 2.5 3 0 0.5 1 1.5 2 2.5 3
VI – Enable Voltage – V VI – Enable Voltage – V
Figure 15 Figure 16
APPLICATION INFORMATION
SN65176B SN65176B
SN75176B SN75176B
RT RT
Up to 32
Transceivers
NOTE A: The line should be terminated at both ends in its characteristic impedance (RT = ZO). Stub lengths off the main line should be kept
as short as possible.
Texas Instruments and its subsidiaries (TI) reserve the right to make changes to their products or to discontinue
any product or service without notice, and advise customers to obtain the latest version of relevant information
to verify, before placing orders, that information being relied on is current and complete. All products are sold
subject to the terms and conditions of sale supplied at the time of order acknowledgement, including those
pertaining to warranty, patent infringement, and limitation of liability.
TI warrants performance of its semiconductor products to the specifications applicable at the time of sale in
accordance with TI’s standard warranty. Testing and other quality control techniques are utilized to the extent
TI deems necessary to support this warranty. Specific testing of all parameters of each device is not necessarily
performed, except those mandated by government requirements.
In order to minimize risks associated with the customer’s applications, adequate design and operating
safeguards must be provided by the customer to minimize inherent or procedural hazards.
TI assumes no liability for applications assistance or customer product design. TI does not warrant or represent
that any license, either express or implied, is granted under any patent right, copyright, mask work right, or other
intellectual property right of TI covering or relating to any combination, machine, or process in which such
semiconductor products or services might be or are used. TI’s publication of information regarding any third
party’s products or services does not constitute TI’s approval, warranty or endorsement thereof.