Questions For/About Rs485 Cable
작성자 정보
- Georgina 작성
- 작성일
본문
Note that the local and the remote must share a common ground, so a minimum of 3 wires are required for half duplex RS485 communications: a pair of transceive wires and a common ground. Each RS422 driver transmits a differential pair of output signals at 0 and 5 volts. RS485 is a half duplex version of RS422 that is capable of multi-drop operation. Newer protocols include the full duplex RS422 and the half duplex RS485 protocols, each of which drives differential 0 to 5 volt signals on the serial cable. It is a half duplex protocol, meaning that only one party at a time may transmit 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. 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.
The QScreen Controller’s kernel software contains a complete set of high level driver routines for the Serial2 port, and these functions are summarized in the Control-C Glossary. A serial communications cable is also supplied with QScreen Starter Kits. Move the serial cable from the "Serial Port 1" connector to the "Serial Port 2" connector on the QScreen. RS485 is another protocol supported by the primary serial port on the QScreen Controller. If your application requires RS485, use the primary serial port (serial1) for RS485 communications, and use the secondary serial port (Serial 2) to program and debug your application code using the RS232 protocol. The RS232 protocol specifies the use of two separate grounds, a signal ground and a protective (or "chassis") ground. The RS422 driver and receiver use separate differential conductor pairs on the serial cables, enabling full duplex communications. The default serial routines used by the onboard kernel assume that full duplex communications are available, so you cannot use the RS485 protocol to program the controller. These detailed signal descriptions and cable diagrams are presented to provide complete information for those who have special communications requirements and for those who wish to make their own application-specific communications cables.
If you have not yet compiled the GETSTART program and you want to do the exercises here, open GETSTART.C in your TextPad editor, click on the Make Tool, and after the compilation is done, enter Mosaic Terminal by clicking on the terminal icon and use the "Send File" menu item to send GETSTART.DLF to the QScreen Controller. In contrast to RS-422, which has a driver circuit which cannot be switched off, RS-485 drivers use three-state logic allowing individual transmitters to be deactivated. The primary and secondary serial communications ports are accessible through the QScreen's 10 pin, dual row Serial Header (H5) which is typically not installed, the 24 pin, dual row Field Header (H3), and through the individual DB-9 Serial 1 and Serial 2 connectors. Function prototypes for this function and other versatile serial I/O routines are defined in the COMM.H header file, and are described in detail in the Control-C Glossary. This function cannot accept incoming data; consult its glossary entry for details. Each of the two channels on the UART Wildcard implements two 16-character FIFOs, one for outgoing characters and one for incoming characters. A FIFO is a First In/First Out buffer that can queue a burst of outgoing characters for transmission, or save a set of incoming characters until the host can read them.
It receives bytes sent by a slave device via the "master in/slave out" pin, MISO. Done that establishes the RS485 receive mode is coded such that it waits until all queued (pending) characters have been transmitted before the driver chip is taken out of transmit mode. SPIE is a local interrupt mask that allows an interrupt to be recognized when an SPI data transfer has completed, or if a write collision or mode fault is detected. The data transfer that is in process when the write collision occurs is completed. Once the data has been exchanged, a flag bit in the SPSR status register is set to indicate that the transfer is complete. 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. Be sure to account for these effects when designing your application. To avoid contention on the RS485 bus, the application software must assure that only one transmitter is enabled at a time. 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).
If you have any concerns regarding where and the best ways to use rs485 cable, you can contact us at our website.
관련자료
-
이전
-
다음