FAQ, RS485 Comm Board with Dual RJ45 Connectors, Laurels.com

It uses balanced differential signals for send and receive. RS-485 signals are used in a wide range of computer and automation systems. Because all of the serial I/O routines on the QScreen Controller are revectorable, it is very easy to change the serial port in use without modifying any high level code. Because of this RS485 and the others can be used in situations with a severe ground level shift of several volts, where at the same time high bit rates are possible because the transition between logical 0 and logical 1 is only a few hundred millivolts. 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. The QED-Forth kernel includes pre-coded drivers that configure and control the SPI for maximum speed data transfers. If you’re looking for a low data transmission speed over a short distance, the RS232 will suffice, even though it is slightly archaic. 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!

Before running the program, let’s switch to the secondary serial port. You might also consider operating the secondary serial port at a lower baud rate to relax the timing constraints. Typing a carriage return at the terminal should now produce the familiar “ok” response via 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. 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. 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. If an interrupt service routine takes longer than 200 µs, then an entire serial bit will be missed, causing a communications error. To use a QScreen as a slave in a multi-drop network, simply define a word, (named Silence(void), for example) that when executed calls RS485Receive() to wait for any pending character transmission to complete, then disable the transmitter, and then execute a routine such as Key() to listen to the communications on the serial bus.

The master and slave can then exchange data. The distinction between master and slave is an important one. Only one active master may control the network at a time; however, the device that assumes the role of master may change according to an appropriate protocol. The /SS (active-low slave select) is typically used to enable data transfers by slave devices when it is active low. At any given time, only the master and a single “active” slave communicate. 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. In the most common multi-drop RS-485 protocol, one computer is designated as a “master” and the rest of the computers or devices on the serial bus are designated as “slaves”. Connecting computers together in multi-drop networks is common in factories and laboratories. RS-485 supports inexpensive local networks and multidrop communications links, using the same differential signaling over twisted pair as RS-422. The resistance of the twisted pair cable will drop the voltage difference as it travels down the wire. Twisted pair structure: Rs485 anti-interference cable has a twisted pair conductor structure.

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. 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. 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 Modbus RS485 connects a Master device to one or more Slave devices. The maximum RS485 cable length is typically listed as 1200 meters or about 4000 feet. RS232 also has a longer maximum cable length (15 Meters for RS232 vs 5 Meters for USB). The SPI can transfer data much more rapidly than an asynchronous serial link – its maximum rate is 2 Megabits/second. The first of the RS standards was RS232, or more correctly RS-232. Once RS-232 was established an equivalent standard was written for the ITU (International Telecommunications Union) to provide a more international standard.

If you loved this information and also you want to obtain more details about what is rs485 cable generously stop by our page.

Designing and Installing an RS485 Serial Network

Leave a Comment

Your email address will not be published. Required fields are marked *

Shopping Cart

Price Based Country test mode enabled for testing United States (US). You should do tests on private browsing mode. Browse in private with Firefox, Chrome and Safari

Scroll to Top