Watch Them Fully Ignoring Rs485 Cable And Be taught The Lesson
작성자 정보
- Cliff 작성
- 작성일
본문
And even worse, if you have a non opto-isolated device installed on that network, any noise could "drain" to ground through the device itself instead of flowing through the ground terminal at the end of the line, damaging the device in the process! Features. Connects a Printer, Router or Other DTE Serial Device to Your Computer ’s USB-A PortThis 30-inch USB to RS485 adapter cable turns your computer ’s USB port into an RS422 or RS485 serial port and avoids the expense of upgrading your reliable serial devices. In the most common multi-drop RS485 protocol, one computer is designated as a master and the rest of the computers or devices on the serial bus are designated as slaves. This section describes the driver routines that control the RS485 transceiver, and presents some ideas that may prove useful in designing a multi-drop data exchange protocol. The primary channel’s UART translates the bit-by-bit data on the serial cable into bytes of data that can be interpreted by the QED-Forth Kernel or by your application program. QED-Forth includes three built-in routines to facilitate control of the RS485 transceiver. Serial 2 is implemented by a software UART in the controller’s QED-Forth Kernel that uses two of the processor’s PortA I/O pins to generate a serial communications channel.
The RS485 protocol uses differential data signals for improved noise immunity; thus RS485 can communicate over greater distances than RS232. RS232 uses inverse logic; that is, a positive bit at the 68HC11 UART is inverted by the onboard RS232 driver chip and appears as a negative signal on the serial cable. Thus, as a rough approximation, operating at 4800 baud full duplex requires about 40 to 50% of the 6811's CPU time (that is, an average of approximately 40 to 50 µs service time every 100 µs). Moreover, if Serial2 is running full duplex at 4800 baud, any other interrupt service routine that takes longer than 100 µs is likely to cause a problem. The Serial 2 port is dedicated to RS232 communications at up to 4800 baud. The Serial 1 port can be configured for either RS232 or RS485 communications at up to 19200 baud. In this manner, data can be exchanged between the master and each slave on the bus. The communications is asynchronous because no synchronizing clock signal is transmitted along with the data.
This automatically activates the SCK clock which synchronously transmits the data. RS232 allows both communicating parties to transmit and receive data at the same time; this is referred to as full duplex communications. Unlike the standard RS232 protocol, RS485 allows many communicating parties to share the same 3-wire communications cable. Since both channels can operate simultaneously and independently, debugging can be performed while the application program is communicating via its primary channel. RS232’s greatest benefit is its universality; practically all personal computers can use this protocol to send and receive serial data. The master can instruct a single slave to go into transmit mode, and then the master can put itself into receive mode, thereby allowing the master to retrieve data from the slave. RS-485 cables typically have two twisted pairs of wires for differential signaling, allowing for greater immunity to electromagnetic interference. The distances these signals are carried is greater due to differential signals. As displayed in the RS485 cable pinout, the interface has all signals in differential configurations.
From the QScreen Controller’s point of view, these three signals (TxD, RxD, and ground) are the only connections required to perform serial communications. Table 9-6 Serial Cable Connections. Table 9-6 shows the connection diagram for a standard 9-pin serial cable. The QScreen Controller’s transmit data signal TxD1 (pin 2 on the 9-pin serial connector) is connected to the terminal’s receive data signal RxD (pin 2 on its 9-pin connector). The RS232 protocol provides for four handshaking signals called ready to send (RTS), clear to send (CTS), data set ready (DSR), and data terminal ready (DTR) to coordinate the transfer of information. We can gain insight into the operation of the RS232 protocol by examining the signal connections used for the primary serial port in Table 9 6. The transmit and receive data signals carry the messages being communicated between the QScreen Controller and the PC or terminal. These signals are described in detail below. Thus RS485 is the standard protocol of choice when multi-drop communications are required. You can use one or both of the PDQ Board’s RS485 links to create such a multi-drop serial network. 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.
관련자료
-
이전
-
다음