RS-422-485协议英文介绍_第1页
RS-422-485协议英文介绍_第2页
RS-422-485协议英文介绍_第3页
RS-422-485协议英文介绍_第4页
RS-422-485协议英文介绍_第5页
已阅读5页,还剩13页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

/RS—422

and

RS-485

application

note

Chapter

1:

Overview

Introduction

The

purpose

of

this

application

note

is

to

describe

the

main

elements

of

an

RS—422

and

RS-485

system。

This

application

note

attempts

to

cover

enough

technical

details

so

that

the

system

designer

will

have

considered

all

the

important

aspects

in

his

data

system

design.

Since

both

RS-422

and

RS-485

are

data

transmission

systems

that

use

balanced

differential

signals,

it

is

appropriate

to

discuss

both

systems

in

the

same

application

note.

Throughout

this

application

note

the

generic

terms

of

RS-422

and

RS-485

will

be

used

to

represent

the

EIA/TIA-422

and

EIA/TIA-485

Standards。

Data

Transmission

Signals

Unbalanced

Line

Drivers

Each

signal

that

transmits

in

an

RS-232

unbalanced

data

transmission

system

appears

on

the

interface

connector

as

voltage

with

reference

to

a

signal

ground。

For

example,

the

transmitted

data

(TD)

from

a

DTE

device

appears

on

pin

2

with

respect

to

pin

(signal

ground)

on

DB-25

connector。

This

voltage

will

be

negative

if

the

line

is

idle

and

alternate

between

that

negative

level

and

a

positive

level

when

data

is

sent

with

magnitude

of

±5

to±15

volts。

The

RS—232

receiver

typically

operates

within

the

voltage

range

of

+3

to

+12

and

-3

to

—12

volts

as

shown

in

Figure

1.1.

Balanced

Line

Drivers

In

a

balanced

differential

system

the

voltage

produced

by

the

driver

appears

across

a

pair

of

signal

lines

that

transmit

only

one

signal.

Figure

1。2

shows

a

schematic

symbol

for

a

balanced

line

driver

and

the

voltages

that

exist。

A

balanced

line

driver

will

produce

a

voltage

from

2

to

6

volts

across

its

A

and

B

output

terminals

and

will

have

a

signal

ground

(C)

connection.

Although

proper

connection

to

the

signal

ground

is

important,

it

isn’t

used

by

balanced

line

receiver

in

determining

the

logic

state

of

the

data

line.

A

balanced

line

driver

can

also

have

an

input

signal

called

an

“Enable”

signal.

The

purpose

of

this

signal

is

to

connect

the

driver

to

its

output

terminals,

and

B.

If

the

“Enable”

signal

is

OFF,

one

can

consider

the

driver

as

disconnected

from

the

transmission

line.

An

RS—485

driver

must

have

the

“Enable"

control

signal.

An

RS-422

driver

may

have

this

signal,

but

it

is

not

always

required.

The

disconnected

or

"disabled”

condition

of

the

line

driver

usually

is

referred

to

as

the

“tristate1"

condition

of

the

driver。

1The

term

“tristate”

comes

from

the

fact

that

there

is

a

third

output

state

of

an

RS—485

driver,

in

addition

to

the

output

states

of

“1"

and

“0."

Balanced

Line

Receivers

A

balanced

differential

line

receiver

senses

the

voltage

state

of

the

transmission

line

across

two

signal

input

lines,

A

and

B.

It

will

also

have

signal

ground

(C)

that

is

necessary

in

making

the

proper

interface

connection.

Figure

1.3

is

a

schematic

symbol

for

balanced

differential

line

receiver。

Figure

1.3

also

shows

the

voltages

that

are

important

to

the

balanced

line

receiver.

If

the

differential

input

voltage

Vab

is

greater

than

+200

mV

the

receiver

will

have

a

specific

logic

state

on

its

output

terminal。

If

the

input

voltage

is

reversed

to

less

than

—200

mV

the

receiver

will

create

the

opposite

logic

state

on

its

output

terminal.

The

input

voltages

that

a

balanced

line

receiver

must

sense

are

shown

in

Figure

1.3。

The

200

mV

to

6

V

range

is

required

to

allow

for

attenuation

on

the

transmission

line.

EIA

Standard

RS-422

Data

Transmission

The

EIA

Standard

RS—422—A

entitled

“Electrical

Characteristics

of

Balanced

Voltage

Digital

Interface

Circuits"

defines

the

characteristics

of

RS-422

interface

circuits.

Figure

1.4

is

a

typical

RS-422

four-wire

interface.

Notice

that

five

conductors

are

used.

Each

generator

or

driver

can

drive

up

to

ten

(10)

receivers。

The

two

signaling

states

of

the

line

are

defined

as

follows:

a.

When

the

“A"

terminal

of

the

driver

is

negative

with

respect

to

the

“B”

terminal,

the

line

is

in

a

binary

1

(MARK

or

OFF)

state。

b。

When

the

“A”

terminal

of

the

driver

is

positive

with

respect

to

the

“B”

terminal,

the

line

is

in

a

binary

0

(SPACE

or

ON)

state.

Figure

1。5

shows

the

condition

of

the

voltage

of

the

balanced

line

for

an

RS-232

to

RS-422

converter

when

the

line

is

in

the

“idle”

condition

or

OFF

state.

It

also

shows

the

relationship

of

the

“A"

and“B”terminals

of

an

RS—422

system

and

the

“-”

and

“+”

terminal

markings

used

on

many

types

of

equipment.

The

“A”

terminal

is

equivalent

to

the

“—”

designation,

and

the

“B"

terminal

equivalent

to

the

“+”

designation.

The

same

relationship

shown

in

Figure

1.5

also

applies

for

RS-485

systems。

RS-422

can

withstand

a

common

mode

voltage

(Vcm)

of

±7

volts.

Common

mode

voltage

is

defined

as

the

mean

voltage

of

the

and

terminals

with

respect

to

signal

ground.

EIA

Standard

RS-485

Data

Transmission

The

RS—485

Standard

permits

balanced

transmission

line

to

be

shared

in

a

party

line

or

multidrop

mode。

As

many

as

32

driver/receiver

pairs

can

share

multidrop

network.

Many

characteristics

of

the

drivers

and

receivers

are

the

same

as

RS—422。

The

range

of

the

common

mode

voltage

Vcm

that

the

driver

and

receiver

can

tolerate

is

expanded

to

+12

to

-7

volts.

Since

the

driver

can

be

disconnected

or

tristated

from

the

line,

it

must

withstand

this

common

mode

voltage

range

while

in

the

tristate

condition。

Some

RS-422

drivers,

even

with

tristate

capability,

will

not

withstand

the

full

Vcm

voltage

range

of

+12

to

—7

volts。

Figure

1。6

shows

a

typical

two-wire

multidrop

network.

Note

that

the

transmission

line

is

terminated

on

both

ends

of

the

line

but

not

at

drop

points

in

the

middle

of

the

line.

Termination

should

only

be

used

with

high

data

rates

and

long

wiring

runs。

A

detailed

discussion

of

termination

can

be

found

in

Chapter

of

this

application

note。

The

signal

ground

line

is

also

recommended

in

an

RS-485

system

to

keep

the

common

mode

voltage

that

the

receiver

must

accept

within

the

-7

to

+12

volt

range。

Further

discussion

of

grounding

can

be

found

in

Chapter

3

of

this

application

note.

An

RS-485

network

can

also

be

connected

in

four-wire

mode

as

shown

in

Figure

1.7。

Note

that

four

data

wires

and

an

additional

signal

ground

wire

are

used

in

a

“four-wire”

connection.

In

a

four-wire

network

it

is

necessary

that

one

node

be

master

node

and

all

others

be

slaves.

The

network

is

connected

so

that

the

master

node

communicates

to

all

slave

nodes.

All

slave

nodes

communicate

only

with

the

master

node.

This

network

has

some

advantages

with

equipment

with

mixed

protocol

communications。

Since

the

slave

nodes

never

listen

to

another

slave

response

to

the

master,

a

slave

node

cannot

reply

incorrectly

to

another

slave

node.

Tristate

Control

of

an

RS—485

Device

using

RTS

As

discussed

previously,

an

RS-485

system

must

have

a

driver

that

can

be

disconnected

from

the

transmission

line

when

a

particular

node

is

not

transmitting。

In

an

RS—232

to

RS-485

converter

or

an

RS—485

serial

card,

this

may

be

implemented

using

the

RTS

control

signal

from

an

asynchronous

serial

port

to

enable

the

RS-485

driver。

The

RTS

line

is

connected

to

the

RS—485

driver

enable

such

that

setting

the

RTS

line

to

a

high

(logic

1)

state

enables

the

RS-485

driver.

Setting

the

RTS

line

low

(logic

0)

puts

the

driver

into

the

tristate

condition.

This

in

effect

disconnects

the

driver

from

the

bus,

allowing

other

nodes

to

transmit

over

the

same

wire

pair.

Figure

1。8

shows

a

timing

diagram

for

a

typical

RS-232

to

RS-485

converter。

The

waveforms

show

what

happens

if

the

VRTS

waveform

is

narrower

than

the

data

VSD。

This

is

not

the

normal

situation,

but

is

shown

here

to

illustrate

the

loss

of

a

portion

of

the

data

waveform。

When

RTS

control

is

used,

it

is

important

to

be

certain

that

RTS

is

set

high

before

data

is

sent。

Also,

the

RTS

line

must

then

be

set

low

after

the

last

data

bit

is

sent.

This

timing

is

done

by

the

software

used

to

control

the

serial

port

and

not

by

the

converter。

When

an

RS-485

network

is

connected

in

two-wire

multidrop

party

line

mode,

the

receiver

at

each

node

will

be

connected

to

the

line

(see

Figure

1。6)。

The

receiver

can

often

be

configured

to

receive

an

echo

of

its

own

data

transmission。

This

is

desirable

in

some

systems,

and

troublesome

in

others.

Be

sure

to

check

the

data

sheet

for

your

converter

to

determine

how

the

receiver

“enable”

function

is

connected。

SendDataControlofanrs-485DeviceManyofB&BElectronics’RS-232toRS-485convertersandRS-485serialcardsincludespecialcircuitry,whichistriggeredfromthedatasignaltoenabletheRS-485driver。Figure1.9isatimingdiagramoftheimportantsignalsusedtocontrolaconverterofthistype.Itisimportanttonotethatthetransmitdatalineis“disabled”atafixedintervalafterthelastbit,typicallyonecharacterlength.Ifthisintervalaftertheistooshort,youcanmisspartsofeachcharacterbeingsent.Ifthistimeistoolong,yoursystemmaytrytoturnthedatalonearoundfromtransmittoreceivebeforethenode(withtheSendDataconverter)isreadytoreceivedata.Ifthelatteristhecase,youwillmissportions(orcompletecharacters)atthebeginningofaresponse.

Chapter

2:

System

Configuration

Network

Topologies

Networkconfiguration

isn’t

defined

in

the

RS—422

or

RS-485

specification。

In

most

cases

the

designer

can

use

a

configuration

that

best

fits

the

physical

requirements

of

the

system。

Two

Wire

or

Four

Wire

Systems

RS-422

systems

require

dedicated

pair

of

wires

for

each

signal,

a

transmit

pair,

a

receive

pair

and

an

additional

pair

for

each

handshake/control

signal

used

(if

required)。

The

tristate

capabilities

of

RS—485

allow

a

single

pair

of

wires

to

share

transmit

and

receive

signals

for

half-duplex

communications。

This

“two

wire”

configuration

(note

that

an

additional

ground

conductor

should

be

used)

reduces

cabling

cost。

RS-485

devices

may

be

internally

or

externally

configured

for

two

wire

systems。

Internally

configured

RS-485

devices

simply

provide

A

and

B

connections

(sometimes

labeled

“-“

and

“+”).

Devices

configured

for

four

wire

communications

bring

out

A

and

B

connections

for

both

the

transmit

and

the

receive

pairs。

The

user

can

connect

the

transmit

lines

to

the

receive

lines

to

create

a

two

wire

configuration.

The

latter

type

device

provides

the

system

designer

with

the

most

configuration

flexibility.

Note

that

the

signal

ground

line

should

also

be

connected

in

the

system。

This

connection

is

necessary

to

keep

the

Vcm

common

mode

voltage

at

the

receiver

within

a

safe

range.

The

interface

circuit

may

operate

without

the

signal

ground

connection,

but

may

sacrifice

reliability

and

noise

immunity.

Figures

2.0

and

2。1

illustrate

connections

of

two

and

four

wire

systems.

Termination

Termination

is

used

to

match

impedance

of

a

node

to

the

impedance

of

the

transmission

line

being

used.

When

impedance

are

mismatched,

the

transmitted

signal

is

not

completely

absorbed

by

the

load

and

portion

is

reflected

back

into

the

transmission

line.

If

the

source,

transmission

line

and

load

impedance

are

equal

these

reflections

are

eliminated.

There

are

disadvantages

of

termination

as

well.

Termination

increases

load

on

the

drivers,

increases

installation

complexity,

changes

biasing

requirements

and

makes

system

modification

more

difficult.

The

decision

whether

or

not

to

use

termination

should

be

based

on

the

cable

length

and

data

rate

used

by

the

system.

A

good

rule

of

thumb

is

if

the

propagation

delay

of

the

data

line

is

much

less

than

one

bit

width,

termination

is

not

needed.

This

rule

makes

the

assumption

that

reflections

will

damp

out

in

several

trips

up

and

down

the

data

line.

Since

the

receiving

UART

will

sample

the

data

in

the

middle

of

the

bit,

it

is

important

that

the

signal

level

be

solid

at

that

point.

For

example,

in

a

system

with

2000

feet

of

data

line

the

propagation

delay

can

be

calculated

by

multiplying

the

cable

length

by

the

propagation

velocity

of

the

cable。

This

value,

typically

66

to

75%

of

the

speed

of

light

(c),

is

specified

by

the

cable

manufacture.

For

our

example,

a

round

trip

covers

4000

feet

of

cable.

Using

propagation

velocityof

0.66×c,oneround

trip

is

completedin

approximately

6.2

μs.

If

we

assume

the

reflections

will

damp

out

in

three

“round

trips”

up

and

down

the

cable

length,

the

signal

will

stabilize

18。6

μs

after

the

leading

edge

of

a

bit。

At

9600

baud

one

bit

is

104

μs

wide.

Since

the

reflections

are

damped

out

much

before

the

center

of

the

bit,

termination

is

not

required。

There

are

several

methods

of

terminating

data

lines.

The

method

recommended

by

B&B

is

paralleltermination。Aresistor

is

added

in

parallel

with

the

receiver's

“A”

and

“B”

lines

in

order

to

match

the

data

line

characteristic

impedance

specified

by

the

cable

manufacture

(120

Ω

is

a

common

value).

This

value

describes

the

intrinsic

impedance

of

the

transmission

line

and

is

not

a

function

of

the

line

length.

A

terminating

resistor

of

less

than

90

Ω

should

not

be

used.

Termination

resistors

should

be

placed

only

at

the

extreme

ends

of

the

data

line,

and

no

more

than

two

terminations

should

be

placed

in

any

system

that

does

not

use

repeaters。

This

type

of

termination

clearly

adds

heavy

DC

loading

to

a

system

and

may

overload

port

powered

RS-232

to

RS—485

converters.

Another

type

of

termination,

AC

coupled

termination,

adds

a

small

capacitor

in

series

with

the

termination

resistor

to

eliminate

the

DC

loading

effect。

Although

this

method

eliminates

DC

loading,

capacitor

selection

is

highly

dependent

on

the

system

properties.

System

designers

interested

in

AC

termination

are

encouraged

to

read

National

Semiconductors

Application

Note

9032

for

further

information.

Figure

2.2

illustrates

both

parallel

and

AC

termination

on

an

RS-485

two-wire

node.

In

four—wire

systems,

the

termination

is

placed

across

the

receiver

of

the

node。

Biasing

an

RS—485

Network

When

an

RS-485

network

is

in

an

idle

state,

all

nodes

are

in

listen

(receive)

mode.

Under

this

condition

there

are

no

active

drivers

on

the

network,

all

drivers

are

tristated.

Without

anything

driving

the

network,

the

state

of

the

line

is

unknown。

If

the

voltage

levelat

the

receiver’s

A

and

B

inputs

islessthan±200

mV

the

logic

level

at

the

output

of

the

receivers

will

be

the

value

of

the

last

bit

received.

In

order

to

maintain

the

proper

idle

voltage

state,

bias

resistors

must

be

applied

to

force

the

data

lines

to

the

idle

condition。

Bias

resistors

are

nothing

more

than

a

pullup

resistor

on

the

data

B

line

(typically

to

5

volts)

and

a

pulldown

(to

ground)

on

the

data

line.

Figure

2.3

illustrates

the

placement

of

bias

resistors

on

a

transceiver

in

a

two—wire

configuration.

Note

that

in

an

RS-485

four—wire

configuration,

the

bias

resistors

should

be

placed

on

the

receiver

lines。

The

value

of

the

bias

resistors

is

dependent

on

termination

and

number

of

nodes

in

the

system.

The

goal

is

to

generate

enough

DC

bias

current

in

the

network

to

maintain

a

minimum

of

200

mV

between

the

and

A

data

line。

Consider

the

following

two

examples

of

bias

resistor

calculation。

Example

1.

10

node,

RS-485

network

with

two

120Ω

termination

resistors

Each

RS-485

node

has

a

load

impedance

of

12KΩ.

10

nodes

in

parallel

give

a

load

of

1200

Ω。

Additionally,

the

two

120

Ω

termination

resistors

result

in

another

60

W

load,

for

a

total

load

of

57

Ω。

Clearly

the

termination

resistors

are

responsible

for

majority

of

the

loading.

In

order

to

maintain

at

least

200mV

between

the

B

and

A

line,

we

need

a

bias

current

of

3.5

mA

to

flow

through

the

load。

To

create

this

bias

from

a

5V

supply

a

total

series

resistance

of

1428

Ω

or

less

is

required。

Subtract

the

57

Ω

that

is

already

part

of

the

load,

and

we

are

left

with

1371

Ω。

Placing

half

of

this

value

as

a

pullup

to

5V

and

half

as

pulldown

to

ground

gives

a

maximum

bias

resistor

value

of

685Ω

for

each

of

the

two

biasing

resistors.

Example

2.

32

node,

RS—485

network

without

termination

Each

RS—485

node

has

load

impedance

of

12KΩ。

32

nodes

in

parallel

gives

a

total

load

of

375

Ω。

In

order

to

maintain

at

least

200

mV

across

375Ω

we

need

current

of

0。53

mA。

To

generate

this

current

from

5V

supply

requires

a

total

resistanceof

9375Ωmaximum。

Since

375

Ω

of

this

total

is

in

the

receiver

load,

our

bias

resistors

must

add

to

9KΩ

or

less.

Notice

that

very

little

bias

current

is

required

in

systems

without

termination。

Bias

resistors

can

be

placed

anywhere

in

the

network

or

can

be

split

among

multiple

nodes.

The

parallel

combination

of

all

bias

resistors

in

a

system

must

be

equal

to

or

less

than

the

calculated

biasing

requirements。

B&B

Electronics

uses

4.7KΩ

bias

resistors

in

all

RS-485

products.

This

value

is

adequate

for

most

systems

without

termination.

The

system

designer

should

always

calculate

the

biasing

requirements

of

the

network。

Symptoms

of

under

biasing

range

from

decreased

noise

immunity

to

complete

data

failure.

Over

biasing

has

less

effect

on

a

system,

the

primary

result

is

increased

load

on

the

drivers。

Systems

using

port

powered

RS—232

to

RS—485

converters

can

be

sensitive

to

over

biasing.

Extending

the

Specification

Some

systems

require

longer

distances

or

higher

numbers

of

nodes

than

supported

by

RS-422

or

RS-485.

Repeaters

are

commonly

used

to

overcome

these

barriers.

An

RS-485

repeater

such

as

B&B

Electronics'

485OP

can

be

placed

in

a

system

to

divide

the

load

into

multiple

segments.

Each

“refreshed”

signal

is

capable

of

driving

another

4000

feet

of

cable

and

an

additional

31

RS-485

loads.

Another

method

of

increasing

the

number

of

RS-485

nodes

is

to

use

low

load

type

RS-485

receivers.

These

receivers

use

a

higher

input

impedance

to

reduce

the

load

on

the

RS—485

drivers

to

increase

the

total

number

of

nodes.

There

are

currently

half

and

quarter

load

integrated

circuit

receivers

available,

extending

the

total

allowable

number

of

nodes

to

64

and

128。ﻬRS—422

RS-485

应用

第一章

概论

引言

本文的目的是描述RS—422和RS-485系统的主要构成.本文尽量包含足够的技术细节以便系统设计师在数据系统设计时能考虑到所有的重要方面.因为RS-422和RS—485都是使用平衡差分信号的数据传输系统,所以将二者放在一起讨论是合适的.在本文中,RS-422

和RS-485通用术语被用于代表EIA/TIA-422和EIA/TIA-485标准.

数据传输信号

非平衡线驱动器

在不平衡数据传输系统RS—232中传输的各个信号,其出现在接口连接器的电压是以信号地为参考的.例如,

对于DB-25连接器,从DTE设备传送的数据(TD)是2脚上的电压,它以信号地7脚为参考电平,如果总线为空闲状态,其电压为负,如果正在发送数据,其电压则在±5

~±15伏的正电平和负电平之间反复切换。如图1。1所示,RS-232接收器的典型工作电压为+3~+12V和-3~—12V。

平衡线驱动器

在平衡差分系统中,驱动器通过一对信号线来传送电压,这对信号线只传送一个信号。如图1。2所示的就是平衡线驱动器的原理符号和线路上所存在的电压。平衡线路驱动器将在线路的A和B两个输出端之间产生一个2~6V的电压,且连接信号地C。虽然接地信号适当接地很重要,但它不被平衡线接收器用来决定数据线上的逻辑状态。一个平衡线驱动器也可能有一个被称为“使能(Enable)”的输入信号,该信号的作用是用来控制驱动器的输出端

A和B跟驱动器之间是否连接.如果使能信号(Enable)为关闭状态,就可以认为驱动器已从传输线上断开了.RS-485与RS-422不同,RS-485的驱动器必须有一个“使能(Enable)"控制信号,而RS—422驱动器可以有这个信号,但并非必需的。驱动器在被断开或“禁止”的情况下,通常指的就是驱动器的“第三态1”的情形。

术语“第三态”指RS-485驱动器输出除“0”和“1”之外的第三种状态.

平衡线接收器

平衡差分线路接收器感测的是两个信号输入端上的传输线A和B之间的电压状态。它也有信号地C,这是做适当的接口衔接所必须的。图1.3是一条平衡差分线路接收器的原理符号。图中显示了电压对平衡线接收器的重要性。如果差分输入电压Vab

大于+200

mV,接收器的输出端将有一个明确的逻辑状态,反过来,如果输入电压小于-200

mV,接收器的输出端将产生相反逻辑状态.一个平衡线路接收器必须能够感测出如图1.3所示的输入电压。因为允许传输线上信号有衰减,故而输入电压要求200mV~6V的范围.

EIA

标准RS-422数据传输

命名为“平衡电压数字接口电路的电气特性”的EIA

RS-422—A标准定义了RS-422接口电路的特性。图1.4是一个典型的RS—422四线接口,注意这里用到五根导线,各发生器或驱动器能驱动多达十个接收器.导线的两个信号的状态定义如下:

a.

当驱动器的A端相对于B端为负时,线路为一个二进制1(MARK

or

OFF)的状态.

b。

当驱动器的A端相对于B端为正时,线路为一个二进制0(SPACE

or

ON)的状态。EIA标准RS—485数据传输

RS-485标准允许平衡传输线在共用线或者多节点模式中共享。一个多节点网络可以有多达32个节点共享一个多点网络.RS-485接收器和发送器的许多特性和RS—422是一样的.RS—485接收器和发送器容许的共模电压范围Vcm允许扩展到+12~-7V。因为RS-485的驱动器可以从总线上分离或以第三态退出,所以,它必须能够第三态时承受得住这样的共模电压范围。有的RS—422驱动器即使有第三态的能力,也并非能够承受+12~-7V的全部共模电压范围。

如图1。6所示的典型2线制多节点网络.注意传输线终止于线路的两端而不是中止于连线上的节点位置。终端应只可用于高速率数据传输和长线传输。关于终端的详细讨论,可到本应用笔记的第二章中查阅.在RS-485系统中,建议连接信号地,以保持共模电压在接收器可接受的-7到+12V范围之内。

RS-485网络也可以连接成如图1.7所示的4线制模式。请注意4线制连接的4条数据线和另外的一条信号地线是一起使用的。在四线制网络里,必须有一个节点为主节点而其余的为从节点.网络这样连接以便让主节点对所有从节点进行通讯,而所有从节点是只对主节点进行通讯。这样的网络比起混合协议通讯来说,具有某些优势.既然从节点从来都不会监听其它从节点对主节点的响应,因此从节点也就不会对其它从节点做出不正确的回应了。

图1.7

典型的4线制RS-485多节点网络

使用RTS的RS—485装置的三态控制

如前所述,

RS—485系统必须具有这样一个驱动器,这个驱动器能够在特定的节点不作传输时从传输线上断开。对RS-232

RS—485转换器或RS—485串口卡,则可以使用异步串口上的RTS控制信号使能RS—485驱动器。将RTS线连接到RS—485驱动器的使能端,用RTS线高电平使能RS-485驱动器,用RTS线的低电平使驱动器进入第三态--—-这里的作用就是让驱动器从总线上分开,允许其它节点在这一对绞线上传输数据。图1。8所示的是一张典型的RS—232到RS-485转换器的时序图.波形图显示了如果VRTS波形比VSD要窄时将会发生的情况。这不是正常操作时的情形,在这里则是为了说明数据已经有部分丢失了.使用控制信号RTS时,发送数据前RTS置高电平无疑是重要的,同样,在发送数据的末位后RTS线必须被置低。这个时序不是由转换器控制完成的的而是由控制端口的软件完成的。

当RS-485网络接成两线制的共用线路模式时,各个节点的接收器都被连接到这对导线上

(参见图1.6)。接收器通常被配置成只接收自己发送数据后的响应信号。这在某些系统是需要的而在别的系统就可能变得麻烦。请务必查对它的数据手册,以确认接收器“使能(enable)”端是如何连接的。RS-485装置的发送数据控制

B&B公司中许多RS-232

RS-485转换器和RS—485串口卡包括用数据信号使能RS—485驱动器的特殊电路。图1.9是用来控制此类转换器重要信号的时序图。要注意,末位发送后的一个固定间隔内传输线被禁止,该间隔的典型值为一个字长。如果该间隔太短,所发送的各个字符就会部分丢失;如果间隔时间太长,系统就会在准备接收数据之前试图将数据线从发送状态变为接收状态。如果是后一种情况,则有可能在开始反应之初就丢失部分字符或丢失整个字符。

第二章

系统配置

网络拓扑

RS—422或RS-485规范中都不定义网络配置。大多数情况下设计者根据系统的物理要求采用最合适的配置。两线或四线的系统

RS-422系统要求给各个信号专门的一对导线,即发送对和接收对,以及用于各握手或控制信号的信号线对(如果要求的话)。RS-485的三态能力允许以半双工通讯的方式分享传送和接收信号的一对导线。这种“双线”配置(注意,另外的一根地线并不能少)可以降低电线成本。对双线系统的配置,RS—485可以是内部或外部的,内部配置的RS-485,简单地提供A和B连接(有时标记为“-"和“+")。

使用四线制通信配置的设备,分别用两组接线端A和B作为发送对和接收对.用户可以连接发送线到接收线,以形成2线制的配置.后者可以让系统设计师在配置时更加灵活。注意,系统应该连接信号地,这样做是确保接收器共模电压Vcm在一个安全电压范围内所必需的。接口电路可以在没有连接信号地时工作,但将牺牲可靠性和抗干扰性。二线和四线系统的连接分别如图2。0和图2。1所示。

终端电阻

终端电阻用于节点阻抗与传输线阻抗匹配。若阻抗不匹配,发送信号会不完全为负载所吸收,同时又部分地反射回到传输线.如果源信号阻抗与传输线阻抗、负载阻抗相等,则这些反射就会被消除.使用终端电阻也有不利的一面,它将加重驱动器的负载,增加装置的复杂性,改变偏置条件和造成系统日后修改困难更大。

是否使用终端电阻,应该根据系统的电缆长度和数据速率决定.一个好的方法是:如果数据线的传播延迟远小于一个位宽度时,就不需要终端电阻。这个规则假定反射在数据线中做几次往返而衰减。由于接收UART(

Universal

Asynchronous

Receiver/Tra

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论