HELUKABEL'S RS485 SIGNAL CABLES

페이지 정보

profile_image
작성자
댓글 0건 조회 18회 작성일 24-07-03 08:23

본문

Sintech-convertisseur-RS232-à-RS485-Maroc.jpg

Chassis and signal grounds are connected together to the digital ground (GND) signal. To provide a convenient means of attaching two grounds to the serial cable, there are several pins (labeled GND) on the communications connector that are connected to the controller’s ground plane. This ability to exchange messages means that the SPI is capable of full duplex communication. 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. In the middle of a character, each interrupt service routine takes about 35 µs. At the start of a transmitted character, the service routine takes about 65 µs. For example, at 4800 baud (bits per second), each bit lasts about 200 microseconds (µs), and if communications are full duplex (e.g., if the QScreen Controller echoes each incoming character), then there is a serial interrupt every 100 µs or so. 1200 is the baud rate that you choose; you can specify any standard baud rate up to 4800 baud. The maximum Serial2 communications rate is 4800 baud. The maximum sustainable baud rate on the secondary serial port is 4800 baud.


If you are running Serial2 at 4800 baud, the rest of your application must be able to function properly using the remaining portion of the CPU time. 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. Routines that temporarily disable interrupts for significant periods of time can also interfere with the Serial2 port. Also, several non-serial interrupts can stack up; if they have higher priority than the serial interrupts, they will be serviced before the Serial2 interrupt routine, and again a serial input or output bit may be lost. On the other hand, the secondary serial port (Serial2) is implemented using hardware pins PA3 (input) and PA4 (output), and is controlled by the associated interrupts IC4/OC5 and OC4, respectively. The secondary serial port is connected similarly except that the onboard connection of RTS to CTS, and DSR to DTR are permanent.


The secondary serial port is implemented by a software UART that controls two pins on PortA. 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 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. The primary serial channel can operate at standard speeds up to 19200 baud and can be configured for either RS232 (the default) or RS485 operation. The QScreen Controller controls the RS485 transceiver with bit 5 of Port D of the processor. 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. We’ll use code from the GETSTART.C program.


In summary, the code provided for implementing the second serial port is very flexible and can be used to support dual concurrent communications ports. In fact, the program works the same as it did before, but now it is using the secondary serial port instead of the primary port -- and you didn’t even have to recompile the code! Using the primary serial port is easy. A jumper, J3, configures the primary serial port for either RS232 or RS485 operation. The RS485 connections are not brought out to the Serial 1 Connector. You might also consider operating the secondary serial port at a lower baud rate to relax the timing constraints. Because the software UART is interrupt based, competing interrupts that prevent timely servicing of the Serial2 interrupts can cause communications errors on the secondary serial channel. Before running the program, let’s switch to the secondary serial port. Now select the "Comm" item in the "Settings" menu of the Terminal program, and click on 1200 baud (or whatever baud rate you selected in the command above).



To read more on rs485 cable look at the web site.

댓글목록

등록된 댓글이 없습니다.

회원로그인

회원가입