Serial Programming:RS-485 Technical Manual

From Wikibooks, the open-content textbooks collection

Jump to: navigation, search

All bookshelves > Science bookshelf > Computer Science bookshelf > Serial communications bookshelf > RS-485 Technical Manual


NOTE: This is a very sparse document right now. You may want to check out wikipedia:RS-485 or wikipedia:RS-232 in the meantime for more information.

Contents

[edit] Introduction

(stub)

[edit] History

(stub)

[edit] Physical Layer

Unlike RS-232, which has a "transmit wire" and a "recieve wire", RS-485 has a "transmit wire pair". Typically one wire is labeled "A" and the other is labeled "B", and the wires are twisted together (a "twisted pair"). This allows RS-485 to transmit over much longer distances, using equivalent wires and equivalent transmitters and receivers, than RS-232.

Many RS-485 implementations use 2 wires (1 pair). At all times, at most one device is transmitting on the pair, and all the other devices on the network are listening (half-duplex). It is the responsibility of user software to ensure that several different devices don't try to transmit at the same time; this can be a tricky coordination task.

Some RS-485 implementations (in particular, some Ethernet configurations) (also some Macintosh GPIO socket) use 4 wires (2 pairs) for point-to-point communication. One of the pairs is dedicated to PC-to-peripheral communication. The other pair is dedicated to peripheral-to-PC communication. Each pair can transmit at full speed whether or not the other pair is transmitting (full-duplex).

[edit] Requirements

(stub)

[edit] Limitations

(stub)

[edit] Handshaking

(stub)

[edit] RS-485 in the Real World

Now being used commonly in the pro audio industry to control digital audio and signal processors such as the DBX driverack and other manufacturers equivalent products. Preferred to RS232 due to cheaper cabling run costs and the common availability of cables (similar to RJ-45).

[edit] Applications

Applications

[edit] Nonstandard Connectors and Wiring

see the 4 wires in the socket? Localtalk only uses the outer pair.
see the 4 wires in the socket? Localtalk only uses the outer pair.

The LocalTalk network uses RS-485-compatible differential signaling on standard 4-wire RJ11 telephone connectors and cable. LocalTalk only connects to the next-outermost pair of wires (the "outer pair" on a standard 4-wire cable).

The innermost pair of wires is ignored by LocalTalk, so the inner pair is often used for standard analog telephones.

(Is there a similar standard for RS-485 on a RJ45?)

[edit] Physical Limitations in Practice

(stub)

From a software point of view, RS-485 looks very similar to RS-232. With 2 pairs of wires -- a dedicated "transmit" pair and a dedicated "receive" pair (similar to some Ethernet hardware), software can't tell the difference between RS-485 and RS-232.

But a lot of RS-485 hardware uses only 1 pair of wires (half-duplex). In that case, the major differences are

  • must "turn off the transmitter" when done transmitting a message, to allow other devices their turn using the shared medium
  • The hardware generally receives on the receiver every byte that was transmitted by every device on the shared medium, including the local transmitter. So software should ignore messages sent by itself.

I've been told that 10BASE-T Ethernet and SCSI cables use a bunch of RS-485 pairs -- is that right ? In the case of 8 bit SCSI this is not the case, the drivers are single wire with a 220/330 ohm terminator at each end of the buss. Half of the conductors in a 50 way cable are ground return wires. This applies to the 8 bit version of the original 50 way SCSI interface. Ultrawide SCSI does use differential drive but whether it is RS485 compatible, I don't know.

CAN bus Cables and Connectors shows standard (?) pinouts for connecting w:CANbus to RJ11 and DE9 connectors. (CANbus uses RS-485 signal levels and hardware, but not ASCII UARTs, right?) CANbus can use RS485 but can also use open collector, optical or its own drivers. In any discussion of these bus systems you need to make a distinction between the physical layer and software and protocol layers. An ASCII UART can use 485 with suitable driver chips...--AndrewJWilson 18:50, 22 June 2006 (UTC)

Personal tools