For understanding STM32 485 communication

485 is a half-duplex communication, i.e., can not transmit and receive information at the same time, two-wire system is generally used.

485's features are:

  1. Determined by the potential difference signal line AB, 2 ~ 6V as 1, -6 ~ -2V 0
  2. Transmission distance, but the distance will lead to decreased transmission speed
  3. Anti-interference ability
  4. It supports multi-node, multi-device communications, to increase the starting and ending ends of the impedance 120

The figure of 485 is a connection, the fact is that no host this to say, we are all equal.

STM32 chip does not have the port 485, but 485 to 485 may be performed by a module UART, such as SP3485

The picture shows a hardware block diagram of SP3485, drawing A, B bus interface for connection to a bus 485. Receiving an output terminal RO, DI is the transmission data received in the terminal, RE is receiving an enable signal (active low), DE is the transmit enable signal (active high)

The hardware connection module STM32 Pictured:

RS485_RE the mouth which can be used in place of an ordinary IO, figure by a PCF8574T module, by expanding IIC IO output signal, when we normally use do not need to do so.

When RS485_RE = 0 when the receive mode; when RS485_RE = 1 when the transmission mode.

Will someone ask, 485 too much trouble, and the transmission speed of 485 depends on the serial port, why are exclusively through the serial port to 485 and then operate directly through the serial port bad Why?

The reason for using 485 may have the following:

  1. Communication from the machine is 485, you can only bite the bullet and go with the 485 Communications
  2. Multi-device communications, only two serial devices
  3. Long-distance transmission

Other Needless to say, a bit STM32-based operations will be right, that's how I understand the 485, as well as the use of talking about 485 STM32.

Guess you like

Origin www.cnblogs.com/showtime20190824/p/11422949.html