If a Star Configuration is Unavoidable
작성자 정보
- Lacey Terrill 작성
- 작성일
본문
The master and slave can then exchange data. The remaining "inactive" slaves may actively receive, or listen to, data on the communications line, but only one slave at a time can transmit a message. The device that initiates a data transfer is the master, and all other devices on the network are slaves. The status of a device as master or slave determines how the various pins must be configured. There are three flag bits implemented in the SPSR (SPI status register). The SPIF is set when a data transfer is complete, and is cleared by a read of the SPSR status register, what is rs485 cable followed by a read or write to the SPDR data register. The MODF bit is cleared by a read of the SPSR followed by a write to the SPCR. The CPHA bit determines whether data is valid on the leading or trailing edge of the clock. The foreword to the standard references The Telecommunications Systems Bulletin TSB-89 which contains application guidelines, including data signaling rate vs. The standard is jointly published by the Telecommunications Industry Association and Electronic Industries Alliance (TIA/EIA). The EIA has officially disbanded and the standard is now maintained by the TIA as TIA-485, but engineers and applications guides continue to use the RS-485 designation.
Since RS-485 is a multi-point specification, however, this is not necessary or desirable in many cases. To ensure that no two devices drive the network at the same time, it is necessary that each slave device be able to disable it’s own RS-485 data transmitter. A ground connection is also necessary to ensure that the communicating devices have a common voltage reference. To interface devices that support synchronized serial interfaces, but are not configurable like the QScreen, determine the device’s requirements for clock phase and polarity and configure the QScreen’s CPHA and CPOL accordingly. It also defines three generator interface points (signal lines); A, B and C. The data is transmitted on A and B. C is a ground reference. To reduce the effect of interference from external electrical signals the RS485 interface uses a differential signal over a "twisted pair" cable. The two values provide a sufficient margin for a reliable data transmission even under severe signal degradation across the cable and connectors. The two lowest order bits in the SPCR control register, named SPR1 and SPR0, determine the data exchange frequency expressed in bits per second; this frequency is also known as the baud rate. Ideally, the two ends of the cable will have a termination resistor connected across the two wires.
The value of each termination resistor should be equal to the cable characteristic impedance (typically, 120 ohms for twisted pairs). Without termination resistors, signal reflections off the unterminated end of the cable can cause data corruption. Interoperability of even similar devices from different manufacturers is not assured by compliance with the signal levels alone. Consult the data sheets for any peripheral devices that you are interfacing to the SPI and, if a different configuration is needed, follow the instructions below to set up the appropriate SPI data transfer protocol. PC environment. 8P8C modular connectors are used in this case. Circuits may be terminated on screw terminals, D-subminiature connectors, or other types of connectors. Grounds between buildings may vary by a small voltage, but with very low impedance and hence the possibility of catastrophic currents - enough to melt signal cables, PCB traces, and transceiver devices. RS-485 is also used in building automation as the simple bus wiring and long cable length is ideal for joining remote devices. RS-485 standard conformant drivers provide a differential output of a minimum 1.5 V across a 54-Ω load, whereas standard conformant receivers detect a differential input down to 200 mV. If you are using the QScreen as a slave device and require the /SS signal for your external SPI hardware, configure one of the Port A pins on the Field Header as an input pin.
By setting this output LOW, the slave’s input /SS is pulled LOW. The truth tables of most popular devices, starting with the SN75176, show the output signals inverted. The arrows in the diagram point to pins configured as inputs, and originate from output pins. The diagram below shows potentials of the A (blue) and B (red) pins of an RS-485 line during transmission of one byte (0xD3, least significant bit first) of data using an asynchronous start-stop method. It does not specify or recommend any communications protocol; Other standards define the protocols for communication over an RS-485 link. The SPI can transfer data much more rapidly than an asynchronous serial link - its maximum rate is 2 Megabits/second. You can use the QScreen’s RS485 link to create such a multi-drop serial network. The recommended arrangement of the wires is as a connected series of point-to-point (multidropped) nodes, i.e. a line or bus, not a star, ring, or multiply connected network. For the QScreen, /SS is not used for SPI communication because it is used to control the direction of the RS485 transceiver; you can use any digital I/O line as a /SS signal. The standard does not discuss cable shielding but makes some recommendations on preferred methods of interconnecting the signal reference common and equipment case grounds.
관련자료
-
이전
-
다음