Switching circuit and switching method for switching data receiving/sending operation of RS-485 serial port
暂无分享,去创建一个
The invention provides a switching circuit for switching the data receiving/sending operation of an RS-485 serial port. The circuit comprises a single-chip microcomputer, an RS-485 driver chip and a level-configurable resistor. The RS-485 driver chip is respectively connected with the single-chip microcomputer and the level-configurable resistor. The invention also provides a switching method for switching the data receiving/sending operation of the RS-485 serial port. During the data sending process of the RS-485 serial port, firstly, a start bit of a low level is sent out. After that, the low level is converted into a high level via a voltage reverse controller. The sending potential energy of the RS-485 driver chip controls a pin to be high in level. An RS-485 serial bus is set to be in the sending state till the stop bit of the high level is sent out. After that, the high level is converted into a low level via the voltage reverse controller. The sending potential energy of the RS-485 driver chip is forbidden. The receiving potential energy of the RS-485 driver chip controls the pin to be low in level and the RS-485 serial port is set to be in the receiving state. Therefore, the data receiving/sending operation of the RS-485 serial port can be controlled without the need of any extra control signal.