관련뉴스
전문가들이 제공하는 다양한 정보

Create A Rs485 Cable A High School Bully Would Be Afraid Of

작성자 작성자 Winnie · 작성일 작성일24-06-04 08:55 · 조회수 조회수 215

페이지 정보

본문

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. Although the RS232 protocol specifies functions for as many as 25 pins, each communications channel requires only three for simple serial interfaces: TxD1 (transmit data), RxD1 (receive data), and DGND (digital ground). 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. Thus in Table 9 6 , RTS1 is connected to CTS1, and DSR1 is connected to DTR1 and DCD1 onboard the QScreen Controller using zero ohm shorting resistors. 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. A jumper, J3, configures the primary serial port for either RS232 or RS485 operation. InitRS485() configures Port D to ensure that bit 5 is an output. The QScreen Controller has two serial communications ports: a primary serial port called Serial 1 that supports both RS232 and RS485 protocols, and a secondary serial port called Serial 2 that supports RS232.



There are surface mount resistor pads on the QScreen that will allow you to bring out the secondary serial port to the Field Header on pins 5-6 or 7-8 as shown with the parentheses in Table 11-3. Pads are also available to bring out the RS485 signals to the DB9 Serial 1 Connector. 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. PC environment. 8P8C modular connectors are used in this case. The standard does not discuss cable shielding but makes some recommendations on preferred methods of interconnecting the signal reference common and equipment case grounds. Many terminals and PCs, however, do rely on hardware handshaking to determine when the other party (in this case the QScreen Controller) is ready to accept data. By connecting pairs of these handshaking signals together, the terminal or PC can be made to think that the QScreen Controller is always ready to send and receive data.



While these signals provide a data path, they do not provide hardware handshaking that allows the two communicating parties to let each other know when they are ready to send or receive data. Pre-coded device drivers configure the SPI for a standard data format, and it is easy to customize a data format and baud rate for your application. If more than one slave tried to drive the transmit line simultaneously, their serial drivers would fight with each other for control of the bus. 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. Communications capability is essential for many instrument control applications. The communications is asynchronous because no synchronizing clock signal is transmitted along with the data. RS485 cable is a type of communication cable used in industrial applications to transmit data between devices over long distances. The interface can be used to support analog to digital and digital to analog converters, networks of many computers controlled by a single master, or networks of devices controlled by several coordinated masters.



The secondary channel is very useful for debugging application programs that communicate with other computers or I/O via the primary channel. Most computers conform to IBM PC AT-compatible RS232 interfaces which use 9-pin D-Type connectors, consequently the QScreen Controller brings out its serial ports to two female 9-pin D-Type connectors. The RS485 connections are not brought out to the Serial 1 Connector. Hardware is interfaced to the SPI via three PORTD pins named SCK, MOSI, and MISO brought out to pins 7, 8, and 10 on the Wildcard Port Header (see Appendix B). The communications port also contains pins for the bi-directional encoder bus. If you are using the QScreen as a slave device and require the /SS signal for your external SPI hardware, rs485 cable configure one of the Port A pins on the Field Header as an input pin. The pinout of the QScreen’s Serial Header (H5), QScreen’s Field Header (H3), and the Serial Connectors are shown in the following tables. Given the availability of ready-made communications cables, it is not necessary to study or understand the following descriptions of cable connections. In this case, cable connections may be made to Serial 1 on either the 10-pin Serial Communications Header or the Serial 1 Connector.

MRbvF.png

댓글목록

등록된 댓글이 없습니다.