CN209748544U - RS485 half-duplex is from receiving and dispatching circuit - Google Patents

RS485 half-duplex is from receiving and dispatching circuit Download PDF

Info

Publication number
CN209748544U
CN209748544U CN201920303196.XU CN201920303196U CN209748544U CN 209748544 U CN209748544 U CN 209748544U CN 201920303196 U CN201920303196 U CN 201920303196U CN 209748544 U CN209748544 U CN 209748544U
Authority
CN
China
Prior art keywords
chip
resistor
mcu
signal
electrically connected
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201920303196.XU
Other languages
Chinese (zh)
Inventor
孙孟洪
王维乐
张凤敏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujian Scud Power Technology Co Ltd
Original Assignee
Fujian Scud Power Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujian Scud Power Technology Co Ltd filed Critical Fujian Scud Power Technology Co Ltd
Priority to CN201920303196.XU priority Critical patent/CN209748544U/en
Application granted granted Critical
Publication of CN209748544U publication Critical patent/CN209748544U/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Bidirectional Digital Transmission (AREA)

Abstract

The utility model relates to a RS485 half-duplex is from transceiver circuit includes a MCU, a 485 chip, resistance R1, resistance R2, resistance R3, resistance R4, resistance R5, triode Q1 and electric capacity C1; the 485 chip is respectively connected with one end of the R3 and the MCU; the other end of the R3 is connected with an external power supply; a collector of the Q1 is respectively connected with one end of the resistor R2 and the 485 chip; the other end of the R2 is connected with an external power supply; the emitter of Q1 is grounded; the base of Q1 is connected with one end of R1; the other end of the R1 is respectively connected with the 485 chip and the MCU; one end of the R5 is respectively connected with the 485 chip and one end of the C1 and is connected with an external power supply; the other end of the R5 is connected with a 485 chip signal A end, and the 485 chip signal A end is also connected to an A end of an external RS485 bus; one end of the R4 is respectively connected with a signal B end of the 485 chip, and the signal B end of the 485 chip is also connected with a B end of an external RS485 bus; the other end of R4, the ground terminal of 485 chip and the other end of C1 are all grounded. The utility model discloses circuit construction low cost.

Description

RS485 half-duplex is from receiving and dispatching circuit
Technical Field
The utility model relates to an electronic circuit application such as signal transmission and communication control, especially a RS485 half-duplex is from transceiver circuit.
Background
RS485 is a serial communication interface widely applied at present, and has the advantages of strong anti-interference capability, long transmission distance, multi-point communication support and the like. Since the RS485 standard electrical characteristics are 2-wire, half-duplex communication systems, it is necessary to switch the transmission/reception state during communication. When RS485 communication is used, besides the control of sending and receiving signals, the switching control of the receiving and sending states of the RS485 is also needed, and data can be normally sent only when a sending switch DE is enabled; data can only be normally accepted when the accept switch RE is enabled.
The traditional RS485 half-duplex receiving and transmitting control mode adopts a three-wire control mode. As shown in fig. 1, the three lines are UART _ RXD, UART _ TXD and a transceiving control terminal UART _ CON. When UART _ CON is in low level, RS485 is in receiving state; UART _ CON is high, RS485 is in transmitting state. Switching of the RS485 transceiving state is achieved by switching the level of UART _ CON. When the three-wire control mode is used for transmitting and receiving communication, a control pin needs to be added on the MCU, and the level of the UART _ CON control end needs to be additionally programmed and switched, so that the complexity of a program is increased.
Disclosure of Invention
In view of this, the utility model aims at providing a RS485 half-duplex is from receiving and dispatching circuit has the data automatic switch-over of receiving and dispatching, and the circuit is built low cost, and the receiving and dispatching control foot does not need the characteristics that the procedure initiative intervenes.
The utility model discloses a following scheme realizes: an RS485 half-duplex self-transceiving circuit comprises an MCU, a 485 chip, a first resistor R1, a second resistor R2, a third resistor R3, a fourth resistor R4, a fifth resistor R5, a triode Q1 and a capacitor C1; the 485 chip is electrically connected with one end of the third resistor R3 and the MCU respectively; the other end of the third resistor R3 is connected with an external power supply; the collector of the triode Q1 is electrically connected with one end of the second resistor R2 and the 485 chip respectively; the other end of the second resistor R2 is connected with an external power supply; the emitter of the triode Q1 is grounded; the base electrode of the triode Q1 is connected with one end of the first resistor R1; the other end of the first resistor R1 is electrically connected with the 485 chip and the MCU respectively; one end of the fifth resistor R5 is respectively connected with the 485 chip and one end of the capacitor C1 and is connected with an external power supply; the other end of the fifth resistor R5 is electrically connected with the signal A end of the 485 chip, and the signal A end of the 485 chip is also connected to the A end of an external RS485 bus; one end of the fourth resistor R4 is electrically connected with the signal B end of the 485 chip respectively, and the signal B end of the 485 chip is also connected to the B end of an external RS485 bus; the other end of the fourth resistor R4, the grounding end of the 485 chip and the other end of the capacitor C1 are all grounded.
Furthermore, an RO pin of the MAX485 chip is electrically connected with the MCU through a UART _ RXD signal line; the other end of the first resistor R1 is electrically connected with the MCU through a UART _ TXD signal line.
Further, the model of the MCU includes but is not limited to STC89 series or STM32 series ARM singlechip.
Compared with the prior art, the utility model discloses following beneficial effect has:
(1) The utility model discloses can realize automatic switch receiving and dispatching state when receiving and dispatching data, practiced thrift the control IO pin on the MCU, also need not additionally to programme simultaneously and switch UART _ CON control end level, simplify the procedure.
(2) The utility model discloses replace former three-way control mode to be applied to RS485 communication circuit, have the receiving and dispatching data automatic switch-over, the low cost is built to the circuit, and the receiving and dispatching control foot does not need the characteristics that the procedure initiative was intervened.
drawings
Fig. 1 is a schematic circuit diagram of a prior art according to an embodiment of the present invention.
Fig. 2 is a schematic circuit diagram according to an embodiment of the present invention.
Detailed Description
The present invention will be further explained with reference to the drawings and the embodiments.
The embodiment provides an RS485 half-duplex self-transceiving circuit, which comprises an MCU, a 485 chip, a first resistor R1, a second resistor R2, a third resistor R3, a fourth resistor R4, a fifth resistor R5, a triode Q1 and a capacitor C1; the 485 chip is electrically connected with one end of the third resistor R3 and the MCU respectively; the other end of the third resistor R3 is connected with an external power supply; the collector of the triode Q1 is electrically connected with one end of the second resistor R2 and the 485 chip respectively; the other end of the second resistor R2 is connected with an external power supply; the emitter of the triode Q1 is grounded; the base electrode of the triode Q1 is connected with one end of the first resistor R1; the other end of the first resistor R1 is electrically connected with the 485 chip and the MCU respectively; one end of the fifth resistor R5 is respectively connected with the 485 chip and one end of the capacitor C1 and is connected with an external power supply; the other end of the fifth resistor R5 is electrically connected with the signal A end of the 485 chip, and the signal A end of the 485 chip is also connected to the A end of an external RS485 bus; one end of the fourth resistor R4 is electrically connected with the signal B end of the 485 chip respectively, and the signal B end of the 485 chip is also connected to the B end of an external RS485 bus; the other end of the fourth resistor R4, the grounding end of the 485 chip and the other end of the capacitor C1 are all grounded.
In this embodiment, the RO pin of the MAX485 chip is electrically connected to the MCU through a UART _ RXD signal line; the other end of the first resistor R1 is electrically connected with the MCU through a UART _ TXD signal line.
In this embodiment, the model of the MCU includes, but is not limited to, an STC89 series or an STM32 series ARM single chip microcomputer.
In this embodiment, the model of the 485 chip includes, but is not limited to, MAX485, SN65LBC184D, and the like.
Preferably, the specific working principle of this embodiment is as follows: as shown in fig. 2, pins 2 (RE) and 3(DE) of U1, which otherwise need to be programmed, are connected to the collector of Q1 and pulled up to VDD using R2 resistor; one end of the R1 is connected with the base of the Q1, and the other end of the R1 is connected with a signal transmitting terminal UART _ TX; the emitter of Q1 is grounded; r3 is for pulling up the signal receiving terminal UART _ RX to VDD; r4 is pulling down the RS485 signal wire B to GND; r5 is pulling up the RS485 signal line A to VDD; c1 is a power supply filter capacitor.
Q1 plays the switching action in the circuit, defaults when not having data, and UART _ TX is the high level, and triode Q1 switches on, and 485 chip RE is the low level and enables, and RO receipt data enable, and the 485 chip is in the receiving state this moment, and what data will be received from 485 chip AB mouth will be passed to UART _ RX through the RO passageway, send into MCU, accomplish the data receiving process.
When transmitting data, UART _ TX will have a pull-down level indicating that data transmission is to begin, transistor Q1 is turned off, DE is enabled high, and DI transmits data is enabled. When data '0' is transmitted, since the DI port is connected to the UART _ TX, the data '0' is transmitted to the AB port a-B <0, and the data '0' is transmitted, completing the low level transmission. When '1' is sent, the triode is conducted at the moment, RO is enabled, but the 485 chip is in a high-resistance state because the triode is still in data sending state at the moment, the state is determined by the pull-up resistor B pull-down resistor of the port A of the 485 chip AB, and the high-level transmission is completed when A-B >0 transmission '1'.
Particularly, the key point of this embodiment is that the RS485 chip is in a receiving state at ordinary times, the transceiving control end of the RS485 chip is controlled by the switching characteristic output level of the triode, the automatic switching function is realized by using the high-low level change of the TX signal and the pull-up and pull-down resistor of the 485A, B port when data is transmitted, and the circuit has the characteristics of saving the MCU control pin, realizing half-duplex automatic switching transceiving without program active intervention, and low circuit construction cost.
It is worth mentioning that the utility model protects a hardware structure, as for the control method does not require protection. The above is only a preferred embodiment of the present invention. However, the present invention is not limited to the above embodiments, and any equivalent changes and modifications made according to the present invention do not exceed the scope of the present invention, and all belong to the protection scope of the present invention.

Claims (3)

1. The utility model provides a RS485 half-duplex is from transceiver circuit which characterized in that: the circuit comprises an MCU, a 485 chip, a first resistor R1, a second resistor R2, a third resistor R3, a fourth resistor R4, a fifth resistor R5, a triode Q1 and a capacitor C1; the 485 chip is electrically connected with one end of the third resistor R3 and the MCU respectively; the other end of the third resistor R3 is connected with an external power supply; the collector of the triode Q1 is electrically connected with one end of the second resistor R2 and the 485 chip respectively; the other end of the second resistor R2 is connected with an external power supply; the emitter of the triode Q1 is grounded; the base electrode of the triode Q1 is connected with one end of the first resistor R1; the other end of the first resistor R1 is electrically connected with the 485 chip and the MCU respectively; one end of the fifth resistor R5 is respectively connected with the 485 chip and one end of the capacitor C1 and is connected with an external power supply; the other end of the fifth resistor R5 is electrically connected with the signal A end of the 485 chip, and the signal A end of the 485 chip is also connected to the A end of an external RS485 bus; one end of the fourth resistor R4 is electrically connected with the signal B end of the 485 chip respectively, and the signal B end of the 485 chip is also connected to the B end of an external RS485 bus; the other end of the fourth resistor R4, the grounding end of the 485 chip and the other end of the capacitor C1 are all grounded.
2. The RS485 half-duplex self-transceiving circuit of claim 1, wherein: the RO pin of the 485 chip is electrically connected with the MCU through a UART _ RXD signal line; the other end of the first resistor R1 is electrically connected with the MCU through a UART _ TXD signal line.
3. The RS485 half-duplex self-transceiving circuit of claim 1, wherein: the model of the MCU includes but is not limited to STC89 series or STM32 series ARM singlechip.
CN201920303196.XU 2019-03-11 2019-03-11 RS485 half-duplex is from receiving and dispatching circuit Active CN209748544U (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201920303196.XU CN209748544U (en) 2019-03-11 2019-03-11 RS485 half-duplex is from receiving and dispatching circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201920303196.XU CN209748544U (en) 2019-03-11 2019-03-11 RS485 half-duplex is from receiving and dispatching circuit

Publications (1)

Publication Number Publication Date
CN209748544U true CN209748544U (en) 2019-12-06

Family

ID=68716182

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201920303196.XU Active CN209748544U (en) 2019-03-11 2019-03-11 RS485 half-duplex is from receiving and dispatching circuit

Country Status (1)

Country Link
CN (1) CN209748544U (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112712684A (en) * 2020-12-16 2021-04-27 安徽阿瑞特汽车电子科技有限公司 Portable bluetooth 485 conversion boxes for automobile debugging

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112712684A (en) * 2020-12-16 2021-04-27 安徽阿瑞特汽车电子科技有限公司 Portable bluetooth 485 conversion boxes for automobile debugging

Similar Documents

Publication Publication Date Title
CN201434881Y (en) RS485 interface circuit and electric energy meter employing same
CN205142203U (en) Automatic transceiver circuits of RS485
CN203851126U (en) Circuit realizing two-way communication by using single line
CN209748544U (en) RS485 half-duplex is from receiving and dispatching circuit
WO2023123823A1 (en) Rs485-based single-wire half-duplex conversion circuit
CN106095708A (en) The electric current loop means of communication of two-wire system half-duplex one master and multiple slaves multi computer communication and system
CN201414124Y (en) Isolation RS485 communication speed-raising circuit for low-speed optical coupler
CN210137320U (en) RS485 circuit capable of automatically switching receiving and transmitting states
CN217821585U (en) MAX485 receiving and dispatching control signal generating device based on serial port sending signal
CN201570019U (en) Passive RS232-485 signal converter
CN101694995B (en) Passive RS232-485 signal converter
CN203520091U (en) Can communication interface circuit
CN105629832B (en) It is a kind of to automatically switch isolation circuit and method without transmitting-receiving control terminal RS485 transmitting-receiving
CN201130377Y (en) Self-adaption circuit for RS-485 interface and RS-422 interface
CN215904446U (en) Unified output foot kicking sensor system
CN213754803U (en) Infrared RS485 and RS232 communication circuit that changes
CN208888807U (en) A kind of automatic addressing system of universal serial bus
CN209930254U (en) Serial port self-sending and self-receiving control circuit
CN210112034U (en) CAN transceiver circuit and CAN communication system
CN108400792B (en) Signal transmitting circuit
CN203554746U (en) DALI signal transmit-receive circuit
CN201623714U (en) Two-way communication circuit
CN101567675B (en) Radio frequency attenuation control device
CN206640575U (en) The serial ports of maskable self-interference turns infrared communication circuit
CN208110594U (en) Serial ports channel selection circuit and vehicular data acquisition box with it

Legal Events

Date Code Title Description
GR01 Patent grant
GR01 Patent grant