CN102184153A - RS-485 transmitting-receiving automatic conversion circuit - Google Patents

RS-485 transmitting-receiving automatic conversion circuit Download PDF

Info

Publication number
CN102184153A
CN102184153A CN2011100927254A CN201110092725A CN102184153A CN 102184153 A CN102184153 A CN 102184153A CN 2011100927254 A CN2011100927254 A CN 2011100927254A CN 201110092725 A CN201110092725 A CN 201110092725A CN 102184153 A CN102184153 A CN 102184153A
Authority
CN
China
Prior art keywords
pin
chip
data
receiving
received
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.)
Pending
Application number
CN2011100927254A
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.)
SHANDONG TAIKAI ELECTRIC AUTOMATION CO Ltd
Original Assignee
SHANDONG TAIKAI ELECTRIC AUTOMATION 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 SHANDONG TAIKAI ELECTRIC AUTOMATION CO Ltd filed Critical SHANDONG TAIKAI ELECTRIC AUTOMATION CO Ltd
Priority to CN2011100927254A priority Critical patent/CN102184153A/en
Publication of CN102184153A publication Critical patent/CN102184153A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Communication Control (AREA)

Abstract

The invention discloses an RS-485 transmitting-receiving automatic conversion circuit which comprises an RS-485 transmitting-receiving circuit and a monostable trigger, wherein the RS-485 transmitting-receiving circuit consists of an RS-485 chip U1, the monostable trigger consists of a 555 timer U2, and the monostable trigger controls the conversion of the receiving and transmitting states of the RS-485 transmitting-receiving circuit. By using the circuit disclosed by the invention, the complexity of programming is reduced, and because the zero delay of RS-485 transmitting and receiving data conversion is realized by virtue of hardware, the reliability of RS-485 data transmission is improved.

Description

A kind of RS-485 transmitting-receiving automatic switching circuit
Technical field
The present invention relates to a kind of based on hard-wired RS-485 transmitting-receiving automatic switching circuit.
Background technology
RS-485 is a kind of serial communication link layer protocol that transmits based on differential signal, and it has solved the too near defective of RS-232 protocol transmission distance, be industrial extensive employing than the long distance data communications link layer protocol.Because it uses a pair of twisted-pair feeder to transmit differential signal, belongs to half-duplex operation, so need receive conversion with transmit status.The RS-485 chip is in accepting state usually, in the time will sending data, is made it to wait for after transmission finishes by software the RS-485 chip being transformed into accepting state again into sending data mode by software control RS-485 chip.The particular register that finishes generally by UART of transmission provides the state indication, perhaps sends about required time by the software data estimator, time-delay a period of time guarantee data send finish after, be transformed into accepting state again.
When receiving and dispatching conversion with software control RS-485, there is following problem: during by the transmitting-receiving of software control data conversion, be converted to when receiving data sending data, have certain transfer delay, wanting to send data and real sending between the data, there is certain transfer delay; If the conversion opportunity that software control sends and receives is improper, then can cause loss of data; During receiving by software control and sending data-switching, introduce easily and disturb, make the UART unit receive unnecessary hash.
Summary of the invention
Receive and dispatch the problems referred to above that conversion exists for solving software control RS-485, the invention provides a kind of RS-485 transmitting-receiving automatic switching circuit, its technical scheme of taking is:
This circuit comprises RS-485 transmission circuit that is made of RS-485 chip U1 and the monostalbe trigger that is made of 555 timer U2, the conversion of monostalbe trigger control RS-485 transmission circuit accepting state and transmit status.
In the RS-485 transmission circuit, 4 pin of RS-485 chip U1 are that data send pin, 1 pin is the Data Receiving pin, 4 pin are connected Data Out pin and the Data In pin with communication function single-chip microcomputer respectively with 1 pin, and 2 pin enable pin for receiving, and 3 pin enable pin for sending, 6 pin and 7 pin constitute the RS-485 differential bus, wherein 6 pin are received on power supply+5V by biasing resistor R1, and 7 pin are received power supply on the ground by biasing resistor R3, and meet terminal build-out resistor R2 between 6 pin and 7 pin; In monostalbe trigger, 6 pin and 7 pin of 555 timer U2 are received on power supply+5V by pull-up resistor R4, receive power supply on the ground by capacitor C 1, receive 2 pin by feedback diode D1, and 5 pin are received power supply on the ground by capacitor C 2; 3 pin of 555 timer U2 are received 2 pin and 3 pin of RS-485 chip U1, and 2 pin of 555 timer U2 are received 4 pin of RS-485 chip U1; When the negative edge of Single-chip Controlling Data Out arrives, the 3 pin output high level of U2, U1 becomes transmit status, when Data Out remains low level, 3 pin of U2 remain high level always, U1 also is a transmit status always, thereby U1 sends the logical zero state of Data Out, when the rising edge of Data Out arrives, U2 picks up counting, the 3 pin output low levels of time-delay back U2, and U1 becomes accepting state, biasing resistor R1 and R3 draw state into logical one to the RS-485 differential bus, thereby U1 continues the logical one state of Data Out is sent.
This circuit has reduced the complexity of programming, has realized that by hardware RS-485 receives and send the zero propagation of data-switching, has improved the RS-485 reliability of data transmission.
Description of drawings
Accompanying drawing is a circuit diagram of the present invention.
Embodiment
The present invention will be further described below in conjunction with accompanying drawing:
As shown in the figure, in the RS-485 transmission circuit, the model of RS-485 chip U1 can be selected 75176B for use, its 4 pin are that data send pin, 1 pin is the Data Receiving pin, 4 pin and 1 pin are connected the Data Out pin and the DataIn pin of single-chip microcomputer or other control circuit respectively, the single-chip microcomputer model can be selected the 80C51 single-chip microcomputer for use, and it has communication function, can carry out exchanges data by 485 buses, 2 pin of U1 enable pin for receiving, 3 pin enable pin for sending, and 6 pin and 7 pin constitute the RS-485 differential bus, and wherein 6 pin are received on power supply+5V by biasing resistor R1,7 pin are received power supply on the ground by biasing resistor R3, and meet terminal build-out resistor R2 between 6 pin and 7 pin.In monostalbe trigger, 6 pin and 7 pin of 555 timer U2 are received on power supply+5V by pull-up resistor R4, receive power supply on the ground by capacitor C 1, and 6 pin are connected the positive pole of feedback diode D1 with 7 pin simultaneously, 2 pin connect the negative pole of feedback diode D1, and 5 pin are received power supply on the ground by capacitor C 2.3 pin of the 555 timer U2 of U2 are received 2 pin and 3 pin of RS-485 chip U1, and 2 pin of 555 timer U2 are received 4 pin of RS-485 chip U1.
When not sending data, will remain high level by monolithic processor controlled Data Out, 2 pin of U2 are high level, and output pin 3 pin of U2 are low level, thereby 2 pin of U1 and 3 pin are low level, and U1 is in accepting state.When sending data, because the start bit of data is low levels, when promptly Data Out is low level, 2 pin of U2 also are low level, and at this moment 3 pin of U2 are output as high level, thereby 2 pin of U1 and 3 pin also are high level, U1 will be in transmit status, and start bit will be sent on the RS-485 differential bus.In like manner, if the data bit that sends is a low level, U1 also will be in transmit status, and logical zero also will be sent on the RS-485 differential bus.If the data bit that sends is a high level, in the 40uS after the rising edge of Data Out arrives, the 3 pin output of U2 also is high level, U1 also is in transmit status, logical one will be sent on the RS-485 differential bus, and behind the 40uS, the output of 3 pin of U2 becomes low level, U1 becomes accepting state, the RS-485 differential bus is a high-impedance state, at this moment, and biasing resistor R1, R3 will draw state into logical one to the RS-485 differential bus, thereby U1 sends the logical one state of Data Out.Thereby realize the conversion of monostalbe trigger control RS-485 transmission circuit accepting state and transmit status.

Claims (3)

1. a RS-485 receives and dispatches automatic switching circuit, comprise RS-485 transmission circuit that constitutes by RS-485 chip U1 and the monostalbe trigger that constitutes by 555 timer U2, it is characterized in that: the conversion of monostalbe trigger control RS-485 transmission circuit accepting state and transmit status.
2. a kind of RS-485 transmitting-receiving automatic switching circuit according to claim 1, it is characterized in that: in the RS-485 transmission circuit, 4 pin of RS-485 chip U1 are that data send pin, 1 pin is the Data Receiving pin, 4 pin and 1 pin are connected the Data Out pin and the Data In pin of the single-chip microcomputer with communication function respectively, 2 pin enable pin for receiving, 3 pin enable pin for sending, 6 pin and 7 pin constitute the RS-485 differential bus, wherein 6 pin are received on power supply+5V by biasing resistor R1,7 pin are received power supply on the ground by biasing resistor R3, and meet terminal build-out resistor R2 between 6 pin and 7 pin; In monostalbe trigger, 6 pin and 7 pin of 555 timer U2 are received on power supply+5V by pull-up resistor R4, receive power supply on the ground by capacitor C 1, receive 2 pin by feedback diode D1, and 5 pin are received power supply on the ground by capacitor C 2; 3 pin of 555 timer U2 are received 2 pin and 3 pin of RS-485 chip U1, and 2 pin of 555 timer U2 are received 4 pin of RS-485 chip U1; When the negative edge of Single-chip Controlling Data Out arrives, the 3 pin output high level of U2, U1 becomes transmit status, when Data Out remains low level, 3 pin of U2 remain high level always, U1 also is a transmit status always, thereby U1 sends the logical zero state of Data Out, when the rising edge of Data Out arrives, U2 picks up counting, the 3 pin output low levels of time-delay back U2, and U1 becomes accepting state, biasing resistor R1 and R3 draw state into logical one to the RS-485 differential bus, thereby U1 continues the logical one state of Data Out is sent.
3. a kind of RS-485 transmitting-receiving automatic switching circuit according to claim 2, it is characterized in that: the model of described RS-485 chip U1 is 75176B.
CN2011100927254A 2011-04-01 2011-04-01 RS-485 transmitting-receiving automatic conversion circuit Pending CN102184153A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2011100927254A CN102184153A (en) 2011-04-01 2011-04-01 RS-485 transmitting-receiving automatic conversion circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2011100927254A CN102184153A (en) 2011-04-01 2011-04-01 RS-485 transmitting-receiving automatic conversion circuit

Publications (1)

Publication Number Publication Date
CN102184153A true CN102184153A (en) 2011-09-14

Family

ID=44570331

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2011100927254A Pending CN102184153A (en) 2011-04-01 2011-04-01 RS-485 transmitting-receiving automatic conversion circuit

Country Status (1)

Country Link
CN (1) CN102184153A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105207693A (en) * 2015-09-30 2015-12-30 浙江锦马自动化科技有限公司 RS485 repeater with pure hardware arbitration function
CN108599799A (en) * 2018-03-20 2018-09-28 四川万益能源科技有限公司 RS485 circuits and communication system
CN112838972A (en) * 2020-12-31 2021-05-25 广州航天海特系统工程有限公司 Enabling control method, device and equipment based on RS-485 transceiver and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
JAN AXELSON: "Designing RS-485 Circuits", 《CIRCUIT CELLAR》 *

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105207693A (en) * 2015-09-30 2015-12-30 浙江锦马自动化科技有限公司 RS485 repeater with pure hardware arbitration function
CN105207693B (en) * 2015-09-30 2017-08-04 浙江锦马自动化科技有限公司 A kind of RS485 repeaters with pure hardware mediation function
CN108599799A (en) * 2018-03-20 2018-09-28 四川万益能源科技有限公司 RS485 circuits and communication system
CN108599799B (en) * 2018-03-20 2024-04-23 四川万益能源科技有限公司 RS485 circuit and communication system
CN112838972A (en) * 2020-12-31 2021-05-25 广州航天海特系统工程有限公司 Enabling control method, device and equipment based on RS-485 transceiver and storage medium

Similar Documents

Publication Publication Date Title
CN106372012B (en) A kind of serial ports wake-up system and serial port communication method without using control line of shaking hands
CN100553260C (en) RS485 communication interface conversion device
CN201434881Y (en) RS485 interface circuit and electric energy meter employing same
CN111277478B (en) RS485 bus multiplexing control method based on slave devices with different baud rates
CN102611545A (en) Hardware-based RS485 (radio sensing 485) automatic transceiving control method and circuit
CN103323737A (en) RS-485 interface polarity detecting method and system based on electric energy meter communication protocol
CN104317762A (en) Method for adaptively controlling transmitting and receiving directions of RS485 chip by aid of FPGA (field programmable gate array)
CN205142203U (en) Automatic transceiver circuits of RS485
CN102184153A (en) RS-485 transmitting-receiving automatic conversion circuit
CN102984791A (en) Energy-saving method for wireless sensor node
CN102546033A (en) Multimachine communication device achieved by adopting pulse modulation combined with serial port mode
CN102929830A (en) Software simulation rapid communication protocol
CN102882754B (en) Repeated interruptions mode 485 direction-controlling method
CN201414124Y (en) Isolation RS485 communication speed-raising circuit for low-speed optical coupler
CN104251536A (en) One-to-many current loop communication method and communication device
CN202159329U (en) RS (Remote Sensing)-485 transceiving automatic converting circuit
CN104216317A (en) Enabling signal control circuit used for improving data transmission reliability of RS485 bus
CN205142206U (en) Switch circuit of communication direction
CN106227691B (en) A kind of reciprocity bi-directional single-wire serial communication method based between MCU
CN101882124B (en) RS422/485 double-use signal converter capable of automatically judging connector
CN104169896A (en) Power management for data ports
CN102521188B (en) Self-adaptive transmit-receive circuit for recommended standard (RS) 485 communication and RS 232 communication
CN101894090A (en) RS-485 signal converter capable of automatically adjusting transmitting-receiving order
CN105629832B (en) It is a kind of to automatically switch isolation circuit and method without transmitting-receiving control terminal RS485 transmitting-receiving
CN214311733U (en) RS485 circuit capable of automatically controlling receiving and transmitting

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C02 Deemed withdrawal of patent application after publication (patent law 2001)
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20110914